Advertisement
makimaki

blah

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