Advertisement
makimaki

Untitled

Jun 18th, 2010
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.42 KB | None | 0 0
  1. ; #******Startup*********#
  2.  
  3. on *:start:{ initmainhash | .timestamp -f 1hh10:1nn10:1ss | echo -sa 1 nth Multi Network Connection. | echo -sa 1 Ready to join Networks and rooms, Type /ehelp at any time. For help using this script. }
  4. on *:exit: { closemainhash }
  5. ;Hashtable
  6. alias initmainhash { if (!$hget(nth)) { hmake nth | if ($exists(data\ $+ nth.dat)) { hload nth data\ $+ nth.dat } } }
  7. alias closemainhash { if ($hget(nth)) { hsave nth data\ $+ nth.dat | hfree nth } }
  8.  
  9. ; #******LOGON TYPE******#
  10.  
  11. ;Buzzen
  12. on ^*:logon:*: {
  13. var %ep $hget(nth, ep) | var %e $hget(nth, $+(email,%ep)) | var %p $hget(nth, $+(pw,%ep))
  14. if (%ep == $null) { setup }
  15. if (%multi == on) && ($server == irc.buzzen.net) { .raw authtype $+(ircwx1,$crlf,user) $me $me $me $+(:,anon) | .raw nick nth | .raw loginh %email $md5(%pw) | unset %multi | halt }
  16. if ($server == irc.buzzen.net) { .raw authtype $+(ircwx1,$crlf,user) $me $me $me $+(:,anon) | .raw nick nth | .raw loginh %e %p }
  17. }
  18. ;Most Servers
  19. on *:connect: {
  20. if ($network == PhreikNET) { mode $me +c | if (%activeaccount == $null) { setup } | /account %activeaccount | halt }
  21. var %nw $hget(nth, $network) | var %n $hget(nth, $+(nick,%nw)) | var %e $hget(nth, $+(email,%nw)) | var %p $hget(nth, $+(pw,%nw))
  22. if ($network != Buzzen) {
  23. if (%nw == $null) { setup }
  24. if (%n != $null) { nick %n }
  25. if (%e != $null) { /NickServ IDENTIFY %e %p | halt }
  26. if (%p != $null) { /NickServ IDENTIFY %p | halt }
  27. }
  28. }
  29. alias setup {
  30. if ($network == PhreikNET) { var %user $$?="Enter User Name:" | var %pass $$?="Enter Password:" | %activeaccount = %user %pass | if ($sock(cookie)) sockclose cookie | cookie update %user %pass | halt }
  31. if ($network == Buzzen) { if (!$hget(nth, ep)) { hadd nth ep 0 } | var %ep $hget(nth, ep) | if (!$hget(nth, $+(email,%ep))) { hadd nth $+(email,%ep) $$?="Enter email address:" } | if (!$hget(nth, $+(pw,%ep))) { hadd nth $+(pw,%ep) $md5($$?="Enter password:") | halt } }
  32. if (!$hget(nth, $network)) { hadd nth $network $network } | var %nw $hget(nth, $network) | if (!$hget(nth, $+(nick,%nw))) { hadd nth $+(nick,%nw) $$?="Enter nick:" } | if (!$hget(nth, $+(email,%nw))) { hadd nth $+(email,%nw) $$?="Enter email address:(if none leave blank)" } | if (!$hget(nth, $+(pw,%nw))) { hadd nth $+(pw,%nw) $$?="Enter password:(if none leave blank)" }
  33. }
  34.  
  35. ;PhreikNet Account Cookie Grabber
  36. alias cookie { if ($1 == update) sockopen cookie www.phreik.net 80 }
  37. on *:SOCKOPEN:cookie:{
  38. tokenize 32 %activeaccount
  39. var %x = cookiegrabber.php?u= $+ $1 $+ &p= $+ $2
  40. sockwrite -n $sockname GET /noht/ $+ %x 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 -a $chr(3) $+ 12 * Account Cookie $4- | set %activeaccount $4- | /account %activeaccount }
  49. else echo -a Error Grabbing Cookie Please Re Enter Your User Name And Password | setup
  50. }
  51. return
  52. }
  53. sockread %t
  54. }
  55.  
  56. ; #********ALIAS*********#
  57.  
  58. ;Debug & Info
  59. alias debug { debug -pt @ $+ $network }
  60. alias cc { if ($1 isnum) { var %i $comchan($snicks, $v1) | return %i : window -a %i } }
  61. alias ehelp { run readme.txt }
  62. alias restart { disconnect | /run mirc.exe | exit }
  63. ;Aways
  64. alias away { .raw away # $1- [br] }
  65. alias ga { var %i $chan(0) | while (%i) { .raw away $chan(%i) $1- [br] | dec %i } }
  66. alias back { .raw away # }
  67. alias gb { var %i $chan(0) | while (%i) { .raw away $chan(%i) | dec %i } }
  68. ;Notices
  69. alias notice { .raw NOTICE $1- | echo $chan $timestamp 5* $me Notice sent to $$2 : $3- }
  70. alias gn { NOTICE # # $1- }
  71. alias sn { var %i $numtok($snicks,44) | while (%i) { notice $active $gettok($snicks,%i,44) $1- | dec %i } }
  72. ;Channel Joins and List
  73. alias list { if ($network == Buzzen) { /dialog -m chan chan | halt } | else { list } }
  74. alias join { set -u10 %lastjoin $1- | if ($network == Buzzen) { join $chr(37) $+ $remove($1-,$chr(37)) | halt } | else { join $1- } }
  75. alias -l joinkeyask { var %i $?=" $1 has a key to join. Enter it now:" | if (%i) { hadd -m jKey $1 %i | .raw join $1 %i } }
  76. ;Mass modes
  77. alias all.users.excluding {
  78. var %c $$1, %a $left($$2, 1), %b $right($$2, 1), %i $iif(%a == +, a, %b), %e $iif(%a == +, $+(',%b), '), %t $nick(%c,0,%i,%e), %r
  79. while (%t > 0) { if ($nick(%c,%t,%i,%e) != $me) { %r = $addtok(%r, $v1, 44) } | dec %t }
  80. return %r
  81. }
  82. alias mmode {
  83. var %c $$1, %m $$2, %n $$3-
  84. if ($numtok(%n, 44) > 5) {
  85. mode %c $+($left(%m,1),$str($right(%m,1),5)) $replace($gettok(%n,1-5,44),$chr(44),$chr(32))
  86. .timer -m 1 1 mmode %c %m $deltok(%n,1-5,44) | return
  87. }
  88. mode %c $+($left(%m,1),$str($right(%m,1),$v1)) $replace($gettok(%n,$+(1-,$v1),44),$chr(44),$chr(32))
  89. }
  90. ;Webchat Joiner
  91. alias webchat {
  92. echo -a * $chan link is12 $weburl | window -apdk0w0 @ $+ # $+ [WebChat]- $+ ( $+ $network $+ )
  93. .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ # $+ [WebChat]- $+ ( $+ $network $+ )).hwnd) | .noop -a $dll(dll\nHTMLn_2.95.dll,navigate,$weburl)
  94. halt
  95. }
  96. alias weburl { if ($network == Buzzen) { return http://www.buzzen.net/chatui.aspx?rm= $+ $replace($remove(#, $chr(37) $+ $chr(35)), \b, $chr(37) $+ 5cb) } }
  97.  
  98. ; #*********RAWS*********#
  99.  
  100. ;Buzzen Whisper work around thanks err0r & extremity
  101. raw whisper:*:{
  102. var %b = $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) | var %text $remove(%b,[br])
  103. if (!$window($nick)) { /query -n $nick } | set %buzzenwhisper. $+ $nick $1 | echo -t $nick $nick $+ : %text | haltdef
  104. }
  105. on *:CLOSE:?: { if (%buzzenwhisper. [ $+ [ $target ] ]) { unset %buzzenwhisper. [ $+ [ $target ] ] } }
  106. ;Mostly Buzzen Based RAWS add what you need
  107. raw *:*: {
  108. if ($2 = PID) { echo -a * $3 Profile Link is12 http://www.buzzen.net/profile.aspx?pid= $+ $4-
  109. window -apdk0w0 @ $+ $3 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
  110. .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $3 $+ 's[Profile]).hwnd)
  111. .noop -a $dll(dll\nHTMLn_2.95.dll,navigate,http://www.buzzen.net/profile.aspx?pid= $+ $4-)
  112. halt
  113. }
  114. if ($numeric == 821) { var %n $mid($gettok($rawmsg,1,33),2-) | echo $1 15 $time %n is back. | cline -m 1 $1 %n | .halt }
  115. if ($numeric == 822) { var %n $mid($gettok($rawmsg,1,33),2-) | echo $1 15 $time %n is away. $remove($2-,[br]) | cline -m 14 $1 %n | .halt }
  116. if ($numeric == 353) { halt } | if ($numeric == 366) { halt }
  117. if ($numeric == 803) { halt } | if ($numeric == 804) { halt } | if ($numeric == 805) { halt }
  118. if ($numeric == 332) { var %m = $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) | echo -a 3* Topic : $remove(%m,[br]) | haltdef }
  119. if ($numeric == 818) { if ($3 == OWNERKEY) { hadd qKey $2 $4 } | elseif ($3 == HOSTKEY) { hadd oKey $2 $4 } }
  120. if ($numeric == 475) {
  121. set $2 $2
  122. if ($hget(jkey,$2)) {
  123. if (%jkey) { echo -sat Could not join $2 with key of $hget(jkey,$2) $+ . | hdel jkey $2 | halt }
  124. if (!%jkey) { set -u2 %jkey 1 }
  125. .raw join $2 $hget(jkey,$2)
  126. }
  127. else { .timer -m 1 1 joinkeyask $2 }
  128. halt
  129. }
  130. if ($numeric == 999) {
  131. var %i $scon(0)
  132. while (%i) {
  133. scon %i
  134. if ($chan(0) < 11) { join %lastjoin | halt }
  135. dec %i
  136. }
  137. server -m $server -j %lastjoin | halt
  138. }
  139. if ($1 == $me) && ($left($2,2) == $chr(37) $+ $chr(35)) && ($3- === No such channel) { .timer 1 2 .raw create $2 }
  140. }
  141.  
  142. ; #********THEME*********#
  143.  
  144. on *:INPUT:#: {
  145. if ((/* !iswm $1) || (/me == $1)) { var %p = $left($nick($chan,$me).pnick,1) | if (%p == $left($me,1)) unset %p
  146. if (/me != $1) {
  147. echo -ti2 $chan 1 $+ $me $+ : $1-
  148. if ($network == buzzen) { privmsg $active %style $1- [/style] | halt } | else { privmsg $active $1- }
  149. halt
  150. }
  151. }
  152. }
  153. on *:INPUT:?: {
  154. echo -ti2 $chan 1 $+ $me $+ : $1-
  155. if ($network == Buzzen) && ($left($1-,1) != /) && ($comchan($active,0) > 0) {
  156. .raw WHISPER $comchan($active,1) $active $+(:,$1-,)
  157. halt
  158. }
  159. else { privmsg $active $1- | halt }
  160. }
  161. on ^*:TEXT:*:#: {
  162. if ($$1 != ^) {
  163. var %b = $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null) | var %cc = $regsubex(%b, /^##\*.*\*##/,$null) | var %text $remove(%CC,[br])
  164. if ($chr(37) isin $nick) { echo $chan $timestamp %text | haltdef }
  165. else { echo -ti2 $chan 1 $nick $+ : %text | halt }
  166. }
  167. }
  168. on *:MODE:#: { if ($1 == +k) { hadd -m jKey # $2- } }
  169. on ^*:ACTION:*:#: { var %b = $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null) | var %cc = $regsubex(%b, /^##\*.*\*##/,$null) | var %text $remove(%CC,[br]) | var %nick = $remove($nick,>) | echo -ti2 $chan 6* %nick %text | halt }
  170. on ^*:NOTICE:*:*: {
  171. if ($nick != MemoServ) {
  172. if ($nick === NeoStats) { echo -a 12* Server Notice 01: $1- | halt } | if ($nick === StatServ) { echo -a 12* Server Notice 01: $1- | halt }
  173. if ($nick === ConnectServ) { echo -a 12* Server Notice 01: $1- | halt } | if ($nick === SecureServ) { echo -a 12* Server Notice 01: $1- | halt }
  174. if ($nick === opsb) { echo $chan 12* Server Notice 01: $1- | halt } | if ($nick == ChanServ) { echo $chan 14* Channel Message3: 14 $2-  | halt }
  175. if ($nick == Global) && ($4 != from) { echo -s 12* Global Message from $network : 1 $1- | halt } | if ($nick == NickServ) { echo -s 12* Notice from $nick 1: $1- | halt }
  176. }
  177. tokenize 32 $Rawmsg
  178. echo $chan $timestamp 5* Notice From $nick : $remove($$5,:) $6- | haltdef
  179. }
  180. on ^*:JOIN:#: {
  181. if ($nick == $me) { if (% isin #) { set # # }
  182. echo $chan 9 $+ $time You have joined # as $me $date | halt } | echo $chan 3 $+ $time $nick Gate:( $+ $address $+ ) has joined # $date | var %a = $readini(data\nicklog.ini,Nicklog,$address($nick,1))
  183. if (!%a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+($chr(44),$nick) } | if (%a) && ($nick !isin %a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+(%a,$chr(44),$nick) } | if ($nick isin %a) { echo $chan $numtok(%a,44) entries for %a }
  184. halt
  185. }
  186. on ^*:PART:#: {
  187. if ($nick == $me) && ($network == Buzzen) { unset # # | halt }
  188. else { echo $chan 5 $+ $time $nick ( $+ $address $+ ) has left # $+ . $date
  189. halt
  190. }
  191. }
  192. on ^*:SNOTICE:*: {
  193. if (!$window(@ServerNotices)) window -n @ServerNotices
  194. echo @ServerNotices $time -- $1-
  195. halt
  196. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement