Advertisement
makimaki

blah

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