; ; Server Seek version 1.2 ; By Sanosuke (aka sanza) ; on *:load:{ if ($version < 5.7) { echo $colour(info) -t *** Invalid version. Please use mIRC 5.7 (5.91 highly suggested) or higher | .unload -rs $nopath($script) } else { serverseek } } menu menubar,channel,status { Server Seek .Open:serverseek .Unload:.unload -rs $nopath($script) } dialog locserver { title "Server Seek" size -1 -1 302 257 box "Possible Server Matches", 8, 5 95 230 120 button "Search", 9, 240 101 54 24 list 11, 12 112 213 96, sort size vsbar button "Close", 12, 240 189 54 24, ok cancel box "Configuration", 13, 6 6 288 84 text "ex: 'us' or 'eu'", 4, 61 41 74 16 edit %ls.c, 3, 12 39 45 21, disable autohs check "Enter your state/province:", 6, 142 19 144 19 edit %ls.s, 5, 141 38 45 21, disable autohs text "ex: 'in' or 'on'", 7, 191 41 71 16 text "Waiting", 19, 5 222 295 16 text "Current server:", 23, 4 239 79 16 text "n/a (n/a)", 24, 82 239 221 14 button "About", 26, 240 160 54 24 check "Enter your country:", 27, 13 19 113 19 check "Enter a network:", 1, 13 62 103 21 edit %ls.n, 2, 117 62 63 21, disable autohs text "ex: 'Dal' or 'UnderNet'", 10, 182 65 113 16 button "Connect", 14, 240 131 54 24 } dialog ls.about { title "About" size -1 -1 269 209 text "Server Seek (version 1.2)", 1, 10 10 181 17 text "By Sanosuke (aka sanza)", 3, 10 25 130 18 text "A special thanks to Soul_Eater. He gave me a piece of code that aided in the output of the servers.", 4, 11 45 248 32 button "OK", 5, 207 178 54 24, ok cancel box "Note", 2, 10 78 248 94 text "Due to the fact that server names aren't all in the same format, some servers may not match any query.", 6, 17 92 232 44 text "Servers such as 'us.undernet.org' will work.", 7, 17 133 229 17 text "However, 'irc.dal.net' will not.", 8, 17 147 138 16 } on *:dialog:locserver:sclick:14:server $did(locserver,11).seltext on *:dialog:locserver:sclick:26:dialog -m ls.about ls.about on *:dialog:locserver:sclick:6:{ set %ls.sp $did(locserver,6).state if (%ls.sp) { did -e locserver 5 } else { did -b locserver 5 } } on *:dialog:locserver:sclick:1:{ set %ls.nt $did(locserver,1).state if (%ls.nt) { did -e locserver 2 } else { did -b locserver 2 } } on *:dialog:locserver:sclick:27:{ set %ls.cs $did(locserver,27).state if (%ls.cs) { did -e locserver 3 } else { did -b locserver 3 } } alias serverseek { dialog -m locserver locserver } on *:dialog:locserver:init:*:{ did -a locserver 24 $iif($server == $null,Disconnected,$server $+ : $+ $port) if (%ls.sp) { did -e locserver 5 did -c locserver 6 } else { did -b locserver 5 } if (%ls.cs) { did -e locserver 3 did -c locserver 27 } else { did -b locserver 3 } if (%ls.nt) { did -e locserver 2 did -c locserver 1 } else { did -b locserver 2 } } on *:dialog:locserver:sclick:9:{ did -r locserver 11 %ls.d = $ticks %ls.c = $did(locserver,3).text %ls.s = $did(locserver,5).text %ls.n = $did(locserver,2).text %ls.si.lines = $calc($lines(servers.ini) - 3) %ls.si.cl = 0 did -a locserver 19 Scanning servers.ini (server %ls.si.cl of %ls.si.lines $+ ) while (%ls.si.cl <= %ls.si.lines) { %ls.si.temp = $remove($readini(servers.ini,servers,n $+ %ls.si.cl),$chr(44)) if (%ls.sp == 1) && (%ls.cs == 1) && (%ls.nt == 1) { if (. $+ %ls.c $+ . isin %ls.si.temp) && (. $+ %ls.s $+ . isin %ls.si.temp) && (%ls.n isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 1) && (%ls.cs == 0) && (%ls.nt == 1) { if (. $+ %ls.s $+ . isin %ls.si.temp) && (%ls.n isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 0) && (%ls.cs == 0) && (%ls.nt == 1) { if (%ls.n isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 0) && (%ls.cs == 1) && (%ls.nt == 1) { if (. $+ %ls.c $+ . isin %ls.si.temp) && (%ls.n isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 1) && (%ls.cs == 1) && (%ls.nt == 0) { if (. $+ %ls.c $+ . isin %ls.si.temp) && (. $+ %ls.s $+ . isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 1) && (%ls.cs == 0) && (%ls.nt == 0) { if (. $+ %ls.s $+ . isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 0) && (%ls.cs == 0) && (%ls.nt == 0) { if (* iswm %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } if (%ls.sp == 0) && (%ls.cs == 1) && (%ls.nt == 0) { if (. $+ %ls.c $+ . isin %ls.si.temp) { var %ls.temp2 $mid(%ls.si.temp,$pos(%ls.si.temp,SERVER:,1),256) did -a locserver 11 $remove($gettok(%ls.temp2,1-2,58),GROUP,SERVER:) } } did -a locserver 19 Scanning servers.ini (server %ls.si.cl of %ls.si.lines $+ ) inc %ls.si.cl if (%ls.si.cl >= %ls.si.lines) { did -a locserver 19 Scanned %ls.si.lines lines and found $did(locserver,11).lines matches ( $+ $round($calc(($ticks - %ls.d) / 1000),2) $+ s, $round($calc(($did(locserver,11).lines / %ls.si.lines) * 100),1) $+ $chr(37) $+ ) unset %ls.si.cl unset %ls.si.temp } } }