Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog socketmain {
- title "Socket Engine by DutchTech Technology."
- size -1 -1 627 485
- tab "Home", 1, 0 0 628 459 tab "Home", 1, 0 0 628 459
- tab "Settings", 9
- text "Socket engine by DutchTech Technology (Version 1.0)", 2, 166 462 282 16
- list 3, 16 38 584 380, tab 1 vsbar
- button "Connect", 4, 44 418 66 24, tab 1
- button "Disconnect", 5, 136 418 66 24, tab 1
- button "Kill socket", 6, 490 416 66 24, tab 1
- button "Reconnect", 7, 400 416 64 24, tab 1
- edit "", 8, 490 460 100 20, read
- edit "", 10, 59 40 134 20, tab 9
- text "NickName", 11, 6 40 48 16, tab 9
- text "User ID", 12, 8 68 40 16, tab 9
- edit "", 13, 58 96 134 20, tab 9
- text "RName", 14, 8 98 44 18, tab 9
- edit "", 15, 59 68 134 20, tab 9
- button "Update", 22, 266 420 74 24, tab 9
- text "Server", 16, 210 38 42 18, tab 9
- edit "", 17, 256 38 116 20, tab 9
- text "Port", 18, 267 65 26 16, tab 9
- edit "", 19, 294 65 46 20, tab 9
- text "Alt Nick", 20, 8 126 56 18, tab 9
- edit "", 21, 58 126 134 20, tab 9
- text "QuitMsg", 27, 390 38 48 17, tab 9
- edit "", 28, 446 38 169 20, tab 9
- edit "", 34, 10 458 134 22, read
- menu "Socket Control", 29
- item "Connect", 30, 29
- item "Disconnect", 31, 29
- item break, 33, 29
- item "Kill Socket", 33, 29
- }
- dialog socket_about {
- title "About this script"
- size -1 -1 231 241
- option pixels
- button "Ok(Cancel)", 1, 79 189 65 25, cancel
- edit "Thanks for using this script! :) This script is OpenSource in any way. But if you edit it i can tell you this script is not for a begginer in mIRC Scripting Language.. If you have paid for this script then you probaly got scammed and you should ask back your money!", 2, 10 60 206 125, multi
- text "About Socket Engine", 3, 62 23 100 17
- text "Script by DutchTech Technologies", 4, 33 222 176 17
- }
- on *:dialog:socketmain:*:*: {
- if ($devent == init) {
- if ($readini(socket.ini,general,nickname) != $null) { did -caur socketmain 10 $readini(socket.ini,general,nickname) }
- if ($readini(socket.ini,general,ident) != $null) { did -caur socketmain 15 $readini(socket.ini,general,ident) }
- if ($readini(socket.ini,general,realname) != $null) { did -caur socketmain 13 $readini(socket.ini,general,realname) }
- if ($readini(socket.ini,general,altnick) != $null) { did -caur socketmain 21 $readini(socket.ini,general,altnick) }
- if ($readini(socket.ini,connect,server) != $null) { did -caur socketmain 17 $readini(socket.ini,connect,server) }
- if ($readini(socket.ini,connect,port) != $null) { did -caur socketmain 19 $readini(socket.ini,connect,port) }
- if ($readini(socket.ini,general,quitmsg) != $null) { did -caur socketmain 28 $readini(socket.ini,general,quitmsg) }
- if ($readini(socket.ini,general,update) != $null) { did -caur socketmain 34 Socket ready. }
- }
- if ($devent == sclick) {
- if ($did == 4) { sockopen socketbot $readini(socket.ini,connect,server) $readini(socket.ini,connect,port) | did -caur socketmain 8 Connecting... }
- if ($did == 5) { sockwrite -nt socketbot QUIT : $+ $readini(socket.ini,general,quitmsg) | did -caur socketmain 8 Disconnected. }
- if ($did == 6) { sockclose socketbot | did -caur socketmain 8 Disconnected. }
- if ($did == 7) { sockwrite -nt socketbot QUIT : $+ $readini(socket.ini,general,quitmsg) | sockopen socketbot $readini(socket.ini,connect,server) $readini(socket,connect,port) }
- if ($did == 22) { updateconfig }
- }
- if ($devent == close) { if ($sock(socketbot).status == $false) { sockwrite -nt socketbot QUIT : $+ $readini(socket.ini,general,quitmsg) (Dialog Closed) } }
- if ($devent == menu) {
- if ($did == 30) { sockopen socketbot $readini(socket.ini,connect,server) $readini(socket.ini,connect,port) | did -caur socketmain 8 Connecting... }
- if ($did == 31) { sockwrite -nt socketbot QUIT : $+ $readini(socket.ini,general,quitmsg) | did -caur socketmain 8 Disconnected. }
- if ($did == 32) { sockwrite -nt socketbot QUIT : $+ $readini(socket.ini,general,quitmsg) | sockopen socketbot $readini(socket.ini,connect,server) $readini(socket.ini,connect,port) | did -caur socketmain 8 Reconnecting.. }
- }
- }
- on *:SOCKOPEN:socketbot: {
- sockwrite -nt $sockname USER $readini(socket.ini,general,ident) $readini(socket.ini,general,nickname) $readini(socket.ini,general,nickname) : $+ $readini(socket.ini,general,realname)
- sockwrite -nt $sockname NICK $readini(socket.ini,general,nickname)
- sockwrite -nt $sockname JOIN #DutchTech
- }
- on *:SOCKREAD:socketbot: {
- var %buffer
- sockread -f %buffer
- tokenize 32 %buffer
- autoscroll socketmain 3
- did -cau socketmain 3 %buffer
- if ($1 = PING) { sockwrite -n $sockname PONG $2 }
- if (*motd* iswm %buffer) { sockwrite -nt $sockname JOIN #DutchTech | did -caur socketmain 8 Connected }
- if ((@help == $text($4)) && ($5 == $null)) { sockwrite -nt socketbot PRIVMSG $3 : $+ $nick $+ : Admin, Calc }
- if ((@help == $text($4)) && ($5 == admin)) { sockwrite -nt socketbot PRIVMSG $3 : $+ $nick $+ : Disconnect, Identify, Join, Part, Restart }
- if ((@help == $text($4)) && ($5 == calc)) { sockwrite -nt socketbot PRIVMSG $3 : $+ $nick $+ : Calc is a calculator (Example: @calc 1+1) }
- if (@calc == $text($4)) { sockwrite -nt socketbot PRIVMSG $3 : $+ $nick $+ : $text($5) $+ = $+ $calc($text($5) ) }
- }
- alias -l text { return $remove($1,:) }
- alias -l autoscroll { if ($did($1,$2).lines) { did -c $1- $v1 | did -u $1- $v1 } }
- alias socketbot { dialog -md socketmain socketmain | did -cau socketmain 8 Disconnected }
- alias -l sockpriv { sockwrite -nt socketbot PRIVMSG $1- }
- alias -l updateconfig {
- writeini socket.ini general nickname $did(10)
- writeini socket.ini general ident $did(15)
- writeini socket.ini general realname $did(13)
- writeini socket.ini general altnick $did(21)
- writeini socket.ini connect server $did(17)
- writeini socket.ini connect port $did(19)
- writeini socket.ini general quitmsg $did(28)
- did -caur socketmain 34 Rewriting config
- .timer 1 2 did -caur socketmain 34 Config updated
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement