Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; #******Startup*********#
- 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. }
- on *:exit: { closemainhash }
- ;Hashtable
- alias initmainhash { if (!$hget(nth)) { hmake nth | if ($exists(data\ $+ nth.dat)) { hload nth data\ $+ nth.dat } } }
- alias closemainhash { if ($hget(nth)) { hsave nth data\ $+ nth.dat | hfree nth } }
- ; #******LOGON TYPE******#
- ;Buzzen
- on ^*:logon:*: {
- var %ep $hget(nth, ep) | var %e $hget(nth, $+(email,%ep)) | var %p $hget(nth, $+(pw,%ep))
- if (%ep == $null) { setup }
- 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 }
- if ($server == irc.buzzen.net) { .raw authtype $+(ircwx1,$crlf,user) $me $me $me $+(:,anon) | .raw nick nth | .raw loginh %e %p }
- }
- ;Most Servers
- on *:connect: {
- if ($network == PhreikNET) { mode $me +c | if (%activeaccount == $null) { setup } | /account %activeaccount | halt }
- var %nw $hget(nth, $network) | var %n $hget(nth, $+(nick,%nw)) | var %e $hget(nth, $+(email,%nw)) | var %p $hget(nth, $+(pw,%nw))
- if ($network != Buzzen) {
- if (%nw == $null) { setup }
- if (%n != $null) { nick %n }
- if (%e != $null) { /NickServ IDENTIFY %e %p | halt }
- if (%p != $null) { /NickServ IDENTIFY %p | halt }
- }
- }
- alias setup {
- 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 }
- 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 } }
- 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)" }
- }
- ;PhreikNet Account Cookie Grabber
- alias cookie { if ($1 == update) sockopen cookie www.phreik.net 80 }
- on *:SOCKOPEN:cookie:{
- tokenize 32 %activeaccount
- var %x = cookiegrabber.php?u= $+ $1 $+ &p= $+ $2
- 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
- }
- on *:SOCKREAD:cookie:{
- if ($sockerr > 0) return
- var %t | sockread %t
- while ($sockbr > 0) {
- tokenize 32 %t
- if ($1 == TICKET:) {
- if ($2 == VALID:) { echo -a $chr(3) $+ 12 * Account Cookie $4- | set %activeaccount $4- | /account %activeaccount }
- else echo -a Error Grabbing Cookie Please Re Enter Your User Name And Password | setup
- }
- return
- }
- sockread %t
- }
- ; #********ALIAS*********#
- ;Debug & Info
- alias debug { debug -pt @ $+ $network }
- alias cc { if ($1 isnum) { var %i $comchan($snicks, $v1) | return %i : window -a %i } }
- alias ehelp { run readme.txt }
- alias restart { disconnect | /run mirc.exe | exit }
- ;Aways
- alias away { .raw away # $1- [br] }
- alias ga { var %i $chan(0) | while (%i) { .raw away $chan(%i) $1- [br] | dec %i } }
- alias back { .raw away # }
- alias gb { var %i $chan(0) | while (%i) { .raw away $chan(%i) | dec %i } }
- ;Notices
- alias notice { .raw NOTICE $1- | echo $chan $timestamp 5* $me Notice sent to $$2 : $3- }
- alias gn { NOTICE # # $1- }
- alias sn { var %i $numtok($snicks,44) | while (%i) { notice $active $gettok($snicks,%i,44) $1- | dec %i } }
- ;Channel Joins and List
- alias list { if ($network == Buzzen) { /dialog -m chan chan | halt } | else { list } }
- alias join { set -u10 %lastjoin $1- | if ($network == Buzzen) { join $chr(37) $+ $remove($1-,$chr(37)) | halt } | else { join $1- } }
- 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 } }
- ;Mass modes
- alias all.users.excluding {
- 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
- while (%t > 0) { if ($nick(%c,%t,%i,%e) != $me) { %r = $addtok(%r, $v1, 44) } | dec %t }
- return %r
- }
- alias mmode {
- var %c $$1, %m $$2, %n $$3-
- if ($numtok(%n, 44) > 5) {
- mode %c $+($left(%m,1),$str($right(%m,1),5)) $replace($gettok(%n,1-5,44),$chr(44),$chr(32))
- .timer -m 1 1 mmode %c %m $deltok(%n,1-5,44) | return
- }
- mode %c $+($left(%m,1),$str($right(%m,1),$v1)) $replace($gettok(%n,$+(1-,$v1),44),$chr(44),$chr(32))
- }
- ;Webchat Joiner
- alias webchat {
- echo -a * $chan link is12 $weburl | window -apdk0w0 @ $+ # $+ [WebChat]- $+ ( $+ $network $+ )
- .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ # $+ [WebChat]- $+ ( $+ $network $+ )).hwnd) | .noop -a $dll(dll\nHTMLn_2.95.dll,navigate,$weburl)
- halt
- }
- alias weburl { if ($network == Buzzen) { return http://www.buzzen.net/chatui.aspx?rm= $+ $replace($remove(#, $chr(37) $+ $chr(35)), \b, $chr(37) $+ 5cb) } }
- ; #*********RAWS*********#
- ;Buzzen Whisper work around thanks err0r & extremity
- raw whisper:*:{
- var %b = $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) | var %text $remove(%b,[br])
- if (!$window($nick)) { /query -n $nick } | set %buzzenwhisper. $+ $nick $1 | echo -t $nick $nick $+ : %text | haltdef
- }
- on *:CLOSE:?: { if (%buzzenwhisper. [ $+ [ $target ] ]) { unset %buzzenwhisper. [ $+ [ $target ] ] } }
- ;Mostly Buzzen Based RAWS add what you need
- raw *:*: {
- if ($2 = PID) { echo -a * $3 Profile Link is12 http://www.buzzen.net/profile.aspx?pid= $+ $4-
- window -apdk0w0 @ $+ $3 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
- .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $3 $+ 's[Profile]).hwnd)
- .noop -a $dll(dll\nHTMLn_2.95.dll,navigate,http://www.buzzen.net/profile.aspx?pid= $+ $4-)
- halt
- }
- if ($numeric == 821) { var %n $mid($gettok($rawmsg,1,33),2-) | echo $1 15 $time %n is back. | cline -m 1 $1 %n | .halt }
- 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 }
- if ($numeric == 353) { halt } | if ($numeric == 366) { halt }
- if ($numeric == 803) { halt } | if ($numeric == 804) { halt } | if ($numeric == 805) { halt }
- if ($numeric == 332) { var %m = $regsubex($3-, /\[(?:style\x20.*?|/style)\]/gi,$null) | echo -a 3* Topic : $remove(%m,[br]) | haltdef }
- if ($numeric == 818) { if ($3 == OWNERKEY) { hadd qKey $2 $4 } | elseif ($3 == HOSTKEY) { hadd oKey $2 $4 } }
- if ($numeric == 475) {
- set $2 $2
- if ($hget(jkey,$2)) {
- if (%jkey) { echo -sat Could not join $2 with key of $hget(jkey,$2) $+ . | hdel jkey $2 | halt }
- if (!%jkey) { set -u2 %jkey 1 }
- .raw join $2 $hget(jkey,$2)
- }
- else { .timer -m 1 1 joinkeyask $2 }
- halt
- }
- if ($numeric == 999) {
- var %i $scon(0)
- while (%i) {
- scon %i
- if ($chan(0) < 11) { join %lastjoin | halt }
- dec %i
- }
- server -m $server -j %lastjoin | halt
- }
- if ($1 == $me) && ($left($2,2) == $chr(37) $+ $chr(35)) && ($3- === No such channel) { .timer 1 2 .raw create $2 }
- }
- ; #********THEME*********#
- on *:INPUT:#: {
- if ((/* !iswm $1) || (/me == $1)) { var %p = $left($nick($chan,$me).pnick,1) | if (%p == $left($me,1)) unset %p
- if (/me != $1) {
- echo -ti2 $chan 1 $+ $me $+ : $1-
- if ($network == buzzen) { privmsg $active %style $1- [/style] | halt } | else { privmsg $active $1- }
- halt
- }
- }
- }
- on *:INPUT:?: {
- echo -ti2 $chan 1 $+ $me $+ : $1-
- if ($network == Buzzen) && ($left($1-,1) != /) && ($comchan($active,0) > 0) {
- .raw WHISPER $comchan($active,1) $active $+(:,$1-,)
- halt
- }
- else { privmsg $active $1- | halt }
- }
- on ^*:TEXT:*:#: {
- if ($$1 != ^) {
- var %b = $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null) | var %cc = $regsubex(%b, /^##\*.*\*##/,$null) | var %text $remove(%CC,[br])
- if ($chr(37) isin $nick) { echo $chan $timestamp %text | haltdef }
- else { echo -ti2 $chan 1 $nick $+ : %text | halt }
- }
- }
- on *:MODE:#: { if ($1 == +k) { hadd -m jKey # $2- } }
- 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 }
- on ^*:NOTICE:*:*: {
- if ($nick != MemoServ) {
- if ($nick === NeoStats) { echo -a 12* Server Notice 01: $1- | halt } | if ($nick === StatServ) { echo -a 12* Server Notice 01: $1- | halt }
- if ($nick === ConnectServ) { echo -a 12* Server Notice 01: $1- | halt } | if ($nick === SecureServ) { echo -a 12* Server Notice 01: $1- | halt }
- if ($nick === opsb) { echo $chan 12* Server Notice 01: $1- | halt } | if ($nick == ChanServ) { echo $chan 14* Channel Message3: 14 $2- | halt }
- 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 }
- }
- tokenize 32 $Rawmsg
- echo $chan $timestamp 5* Notice From $nick : $remove($$5,:) $6- | haltdef
- }
- on ^*:JOIN:#: {
- if ($nick == $me) { if (% isin #) { set # # }
- 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))
- 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 }
- halt
- }
- on ^*:PART:#: {
- if ($nick == $me) && ($network == Buzzen) { unset # # | halt }
- else { echo $chan 5 $+ $time $nick ( $+ $address $+ ) has left # $+ . $date
- halt
- }
- }
- on ^*:SNOTICE:*: {
- if (!$window(@ServerNotices)) window -n @ServerNotices
- echo @ServerNotices $time -- $1-
- halt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement