Advertisement
makimaki

p's revision

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