Advertisement
makimaki

blah

Jul 25th, 2010
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 9.04 KB | None | 0 0
  1.  
  2. ;STATUP
  3.  
  4. on *:start:{
  5.   .timestamp -f hh:nn:sstt
  6.   .titlebar nth Multi Network Connection - By MakiMaki & seraphim
  7.   echo -sa 1nth Multi Network Connection.
  8.   echo -sa 1Ready to join Networks and rooms, Type /ehelp  at any time. For help using this script.
  9. }
  10.  
  11. ;SERVER/LOGIN
  12.  
  13. on ^*:LOGON:*: {
  14.   if ($server == irc.buzzen.net) {
  15.     if (%buzzen == $null) {
  16.       var %e $$?="Enter Passport details:"
  17.       var %p $$?="Enter Your Password:"
  18.       set %buzzen %e %p
  19.     }
  20.     rw LOGINH $gettok(%buzzen,1,32) $md5($gettok(%buzzen,2,32))  $+ $lf $+ user %e  * * :anon
  21.     halt
  22.   }
  23. }
  24.  
  25. ;Most Servers
  26. on *:connect: {
  27.   if ($network == PhreikNET) {
  28.     if (%phreik == $null) { cookie }
  29.     /account %phreik
  30.     mode $me +c
  31.   }
  32.   elseif ($network == Sparkpea.Net) {
  33.     if (%sparkpea == $null) { var %e $$?="Enter Passport details:" | var %p $$?="Enter Your Password:" | set %sparkpea %e %p }
  34.     /NickServ IDENTIFY %sparkpea
  35.   }
  36.   elseif ($network == koach.com) {
  37.     if (%koach == $null) { var %e $$?="Enter Nickname:" | var %p $$?="Enter Your Password:" | set %koach %e %p }
  38.     nick $gettok(%koach,1,32) | /NickServ IDENTIFY $gettok(%koach,2,32)
  39.   }
  40. }
  41.  
  42. ;PhreikNet Account Cookie Grabber
  43. alias cookie {
  44.   var %u $?="Enter User Name:" | var %p $$?="Enter Password:" | set %phreik %u %p
  45.   if ($sock(cookie)) sockclose cookie
  46.   sockopen cookie www.phreik.net 80
  47. }
  48.  
  49. on *:SOCKOPEN:cookie:{
  50.   sockwrite -n $sockname GET /noht/cookiegrabber.php?u= $+ $gettok(%phreik,1,32) $+ &p= $+ $gettok(%phreik,2,32) HTTP/1.1 $+ $crlf $+  Accept: */* $+ $crlf $+ Accept-Language: en-au $+ $crlf $+ Accept-Encoding: gzip, deflate $+ $crlf $+ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) $+ $crlf $+ Host: www.phreik.net $+ $crlf $+ Connection: close $+ $crlf $+ $crlf
  51. }
  52.  
  53. on *:SOCKREAD:cookie:{
  54.   if ($sockerr > 0) return
  55.   var %t | sockread %t
  56.   while ($sockbr > 0) {
  57.     tokenize 32 %t
  58.     if ($1 == TICKET:) {
  59.       if ($2 == VALID:) { echo -s 12 * Account Cookie $4- | set %phreik $4-  }
  60.       else { echo -s Error Grabbing Cookie. | cookie }
  61.     }
  62.     return
  63.   }
  64.   sockread %t
  65. }
  66.  
  67. ;ALIASES
  68. ;Debug
  69. alias debug { debug -pt @ $+ $network }
  70.  
  71. ;Gen
  72. alias cc { if ($1 isnum) { var %i $comchan($snicks, $v1) | return %i : window -a %i } }
  73. alias ehelp { run readme.txt }
  74. alias restart { disconnect | /run mirc.exe | exit }
  75.  
  76. ;Notices
  77. alias notice {  rw notice $1- | echo $chan $timestamp 5* $me Notice sent to $$2 : $3- }
  78. alias gn {  NOTICE # # $1- }
  79. alias sn { var %i $numtok($snicks,44) | while (%i) { notice $active $gettok($snicks,%i,44) $1- | dec %i } }
  80.  
  81. ;Aways
  82. alias away {
  83.   if ($istok(%awaychan,$active,32)) { .raw away $active | set %awaychan $remtok(%awaychan,$active,32) }
  84.   else { .raw away $active $iif($1,$1-,[br]) | set %awaychan $addtok(%awaychan,$active,32) }
  85. }
  86. alias globalaway { var %i $chan(0) |  while (%i) { .raw away $chan(%i) $1- [br] | dec %i } }
  87. alias globalback  { var %i $chan(0) |  while (%i) { .raw away $chan(%i) | dec %i } }
  88.  
  89. ;Channel Joins and List
  90. alias list { if ($network == Buzzen) { /dialog -m chan chan | halt } | else { list } }
  91.  
  92. alias join {
  93.   if ($network == Buzzen) {
  94.     set -u10 %lastjoin $1-
  95.     var %c $remove($1,$chr(37))
  96.     rw join $iif($network  == Buzzen,$bcnr($gettok(%c,1,44)),$gettok(%c,1,44))
  97.     var %c $deltok(%c,1,44)    
  98.     if ($numtok(%c,44)) .timer 1 1 join %c
  99.   }
  100.   elseif (Sparkpea isin $network) { rw join $chr(37) $+ $remove($1-,$chr37)  }
  101.   else { rw join $1- }
  102.   haltdef
  103. }
  104.  
  105. ;Modes,Kicks ect
  106. alias kick { rw kick $1- }
  107. alias mode { rw mode $1- }
  108.  
  109. ;Mass Modes Thanks extremity
  110. alias mmode {
  111.   var %c $1, %m $$2, %i $nick(%c,0)
  112.   while (%i) { rw mode %c %m $nick(%c,%i) | dec %i }
  113. }
  114. alias mkick {
  115.   var %c $$1, %n $$2-, %d 1
  116.   KICK %c $gettok(%n, 1, 44)
  117.   var %n $remtok(%n, $gettok(%n, 1, 44), 1, 44)
  118.   if ($numtok(%n, 44)) { .timer -m 1 %d mkick %c %n }
  119. }
  120.  
  121. ;Echos a link plus popups a window of the users profile
  122. alias profiles {
  123.   if ($network == Sparkpea.Net) { var %n sparkpea.net/profile.php?epuid=  }
  124.   elseif ($network == PhreikNET) { var %n phreik.net/profile.msnw?epuid=   }
  125.   elseif ($network == Buzzen) { var %n buzzen.net/profile.aspx?pid= }
  126.   echo -a * $1  Profile Link is12 http://www. $+ %n $+ $2 
  127.   window -apdk0w0  @ $+ $1 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
  128.   .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $1 $+ 's[Profile]).hwnd))
  129.   .noop -a $dll(dll\nHTMLn_2.95.dll,navigate, http://www. $+ %n $+ $2 )
  130. }
  131.  
  132. ; Buzzen specific
  133. alias access { rw access $1- }
  134. alias bcnr { return $+($chr(37),$chr(35),$replace($remove($$1-,$chr(58),$chr(37),$chr(35)),$chr(32),\b)) }
  135. ;Thanks to Nick for the regx
  136. alias bcnstrip return $iif($network = Buzzen, $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null), $1-)
  137.  
  138. ;QUEUE
  139. ;Thanks extremity      
  140. alias -l rw {
  141.   hinc -m que total
  142.   hadd que $hget(que,total) $1-
  143.   if (!$hget(que,idx)) { hinc que idx }
  144.   if (!$hget(que,run)) {
  145.     hadd que run 1
  146.     que
  147.   }
  148. }
  149. alias -l que {
  150.   :start
  151.   var %i $hget(que,idx)
  152.   .raw $hget(que, %i)
  153.   hinc que idx
  154.   if (11 // %i) {
  155.     .timer -m 1 1300 que
  156.     return
  157.   }
  158.   if (%i >= $hget(que, total)) {
  159.     hdel que run
  160.     .timerqr -m 1 1300 qclr
  161.     return
  162.   }
  163.   goto start
  164. }
  165. alias -l qclr { if (!$hget(que,run)) {
  166.     hdel que total
  167.     hdel que idx 0
  168.   }
  169. }
  170.  
  171. ;RAWS
  172. ;Thanks err0r, extremity, Exploiter, and p0d for all the help
  173. raw *:*: {
  174.   if (%raw == on) {
  175.     if (!$window(raws)) { window @raws }
  176.     echo -t @raws =========================
  177.     echo -t @raws   Number: $numeric
  178.     echo -t @raws   RawMsg: $rawmsg
  179.     echo -t @raws   Params: $1-
  180.     echo -t @raws  
  181.   }
  182.   if ($gettok($rawmsg,2,32) isin 002 003 004 005 251 265 329 353 366 422 914) { halt }
  183.   elseif ($numeric == 403) {
  184.     CREATE $2
  185.     halt
  186.   }
  187.   elseif ($numeric == 801) {
  188.     echo -t $2 5Added $3 to access for $4
  189.     halt
  190.   }
  191.   if ($numeric == 803) { halt }
  192.   if ($numeric == 804) { halt }
  193.   if ($numeric == 805) { halt }
  194.   if ($numeric == 332) {
  195.     echo $2 3 $timestamp * Topic : $bcnstrip($3-)
  196.     haltdef
  197.   }
  198.   elseif ($numeric == 821) {
  199.     var %n $mid($gettok($rawmsg,1,33),2-)
  200.     echo -t $1 7 %n has returned.
  201.     cline -m 2 $1 %n
  202.     halt
  203.   }
  204.   elseif ($numeric == 822) {
  205.     if ($network == Buzzen) {
  206.       var %n $mid($gettok($rawmsg,1,33),2-)
  207.       echo -t $1 7 %n is away: $2-
  208.       cline -m 12 $1 %n
  209.       halt
  210.     }
  211.   }
  212.   if ($numeric == 818) {
  213.     if ($3 == OWNERKEY) { hadd qKey $2 $4 }
  214.     elseif ($3 == HOSTKEY) { hadd oKey $2 $4 }
  215.     elseif ($3 == PUID) {  profiles $2 $4 }
  216.   }
  217.   elseif ($2 == PID) { profiles $3 $4 }
  218.   if ($numeric == 999) {
  219.     var %i $scon(0)
  220.     while (%i) {
  221.       scon %i
  222.       if ($chan(0) < 11) {
  223.         join %lastjoin
  224.         halt
  225.       }
  226.       dec %i
  227.     }
  228.     server -m irc.buzzen.net -j %lastjoin
  229.     halt
  230.   }
  231. }
  232.  
  233. ;Buzzen Whisper work around thanks err0r & extremity
  234. raw whisper:*:{
  235.   if (!$window($nick)) {
  236.     /query -n $nick
  237.   }
  238.   set %buzzenwhisper. $+ $nick $1
  239.   echo -t $nick $nick (7 $+ $1 $+ ) : $bcnstrip($1-)
  240.   haltdef
  241. }
  242. on *:CLOSE:?: { if (%buzzenwhisper. [ $+ [ $target ] ]) { unset %buzzenwhisper. [ $+ [ $target ] ] } }
  243.  
  244. ;EVENTS/THEME
  245. on *:INPUT:#: {
  246.   if ($left($1,1)  != /) {
  247.     rw PRIVMSG # $+(:,$iif($network = buzzen,%style $+ $1- $iif(%style,[/style]),$1-))
  248.     echo  -ti2 $chan 10 $+ $me  $+ : $1-
  249.     haltdef
  250.   }
  251. }
  252. on *:INPUT:?: {
  253.   if ($network == Buzzen) && ($left($1-,1) != /) && ($comchan($active,0) > 0) { rw WHISPER $comchan($active,1) $active $+(:,$1-,) }
  254.   else { privmsg $active $1-  }
  255.   echo  -ti2 $chan 1 $+ $me $+ : $1-
  256.   haltdef  
  257. }
  258. on ^*:TEXT:*:#: {
  259.   if ($chr(37) isin $nick) { echo $chan 10 $timestamp * Welcome : $bcnstrip($1-) }
  260.   else { echo  -ti2 $chan 2 $nick  $+ :14 $bcnstrip($1-) }
  261.   haltdef
  262. }
  263. on ^*:ACTION:*:#: { echo  -ti2 $chan 6* $nick $bcnstrip($1-) | haltdef }
  264. on ^*:NOTICE:*:*: {  
  265.   if ($nick != MemoServ) {
  266.     if ($nick === NeoStats) {  echo -a 12* Server Notice 01: $1- }
  267.     elseif ($nick === opsb) { echo $chan 12* Server Notice 01: $1- }  
  268.     elseif ($nick == Global) && ($4 != from) { echo -s 12* Global Message from $network : 1 $1- }
  269.     elseif ($nick == ChanServ) { echo $chan  14* Channel Message3: 14 $2-  }
  270.     haltdef
  271.   }
  272.   tokenize 32 $Rawmsg
  273.   echo $chan $timestamp 5* Notice From $nick : $remove($$5,:) $6-
  274.   haltdef
  275. }
  276. on ^*:SNOTICE:*: { echo -st 5* Server Notice: $1- | halt }
  277. on ^*:JOIN:#: {
  278.   if ($nick == $me $nick == $me && $chr(37) isin #) { set # # | haltdef }
  279.   var %a $readini(data\nicklog.ini,Nicklog,$address($nick,1))
  280.   if (!%a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+($chr(44),$nick) }
  281.   elseif (%a) && ($nick !isin %a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+(%a,$chr(44),$nick) }
  282.   else { echo $chan $numtok(%a,44) entries for %a }
  283. }
  284. on ^*:PART:#: {
  285.   if ($nick == $me && $chr(37) isin #) { unset # # | haltdef }
  286. }
  287.  
  288. on ^*:RAWMODE:#: {
  289.   echo # $timestamp 7 $nick sets mode 1 $+ $1 7 $+ $2-
  290.   haltdef
  291. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement