Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;STATUP
- on *:start:{
- .timestamp -f hh:nn:sstt
- .titlebar nth Multi Network Connection - By MakiMaki & seraphim
- echo -sa 1nth Multi Network Connection.
- echo -sa 1Ready to join Networks and rooms, Type /ehelp at any time. For help using this script.
- }
- ;SERVER/LOGIN
- on ^*:LOGON:*: {
- if ($server == irc.buzzen.net) {
- if (%buzzen == $null) { set %buzzen $$?="Enter Passport details:" $$?="Enter Your Password:" }
- rw LOGINH $gettok(%buzzen,1,32) $md5($gettok(%buzzen,2,32)) $+ $lf $+ user %e * * :anon
- halt
- }
- }
- ;Most Servers
- on *:connect: {
- if ($network == PhreikNET) {
- if (%phreik == $null) { cookie }
- /account %phreik
- mode $me +c
- }
- elseif ($network == Sparkpea.Net) {
- if (%sparkpea == $null) { set %sparkpea $$?="Enter Passport details:" $$?="Enter Your Password:" }
- /NickServ IDENTIFY %sparkpea
- }
- elseif ($network == koach.com) {
- if (%koach == $null) { set %koach $$?="Enter Nickname:" $$?="Enter Your Password:" }
- nick $gettok(%koach,1,32) | /NickServ IDENTIFY $gettok(%koach,2,32)
- }
- }
- ;PhreikNet Account Cookie Grabber
- alias cookie {
- set %phreik $$?="Enter User Name:" $$?="Enter Your Password:"
- if ($sock(cookie)) sockclose cookie
- sockopen cookie www.phreik.net 80
- }
- on *:SOCKOPEN:cookie:{
- 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
- }
- on *:SOCKREAD:cookie:{
- if ($sockerr > 0) return
- var %t | sockread %t
- while ($sockbr > 0) {
- tokenize 32 %t
- if ($1 == TICKET:) {
- if ($2 == VALID:) { echo -s 12 * Account Cookie $4- | set %phreik $4- }
- else { echo -s Error Grabbing Cookie. | cookie }
- }
- return
- }
- sockread %t
- }
- ;ALIASES
- ;Debug
- alias debug { debug -pt @ $+ $network }
- alias restart { disconnect | /run mirc.exe | exit }
- ;NOTICES/SEL USER NOTICE
- alias notice { rw notice $1- | echo $chan $timestamp 5* $me Notice sent to $$2 : $3- }
- alias sn { var %i $numtok($snicks,44) | while (%i) { notice $active $gettok($snicks,%i,44) $1- | dec %i } }
- ;AWAYS/RETURNS
- alias away {
- if ($istok(%awaychan,$active,32)) { .raw away $active | set %awaychan $remtok(%awaychan,$active,32) }
- else { .raw away $active $iif($1,$1-,[br]) | set %awaychan $addtok(%awaychan,$active,32) }
- }
- alias globalaway { var %i $chan(0) | while (%i) { .raw away $chan(%i) $1- [br] | set %awaychan $addtok(%awaychan,$chan(%i),32) | dec %i } }
- alias globalback { var %i $chan(0) | while (%i) { .raw away $chan(%i) | set %awaychan $remtok(%awaychan,$chan(%i),32) | dec %i } }
- ;JOIN/CHANNEL LISTER
- alias list { if ($network == Buzzen) { dialog -m chan chan | halt } | else { list } }
- alias join {
- if ($network == Buzzen) {
- set -u10 %lastjoin $1-
- var %c $remove($1,$chr(37))
- rw join $iif($network == Buzzen,$bcnr($gettok(%c,1,44)),$gettok(%c,1,44))
- var %c $deltok(%c,1,44)
- if ($numtok(%c,44)) .timer 1 1 join %c
- }
- elseif (Sparkpea isin $network) { rw join $chr(37) $+ $remove($1-,$chr37) }
- else { rw join $1- }
- haltdef
- }
- ;Modes,Kicks ect
- alias kick { rw kick $1- }
- alias mode { rw mode $1- }
- ;Mass Modes Thanks extremity
- alias mmode {
- var %c $1, %m $$2, %i $nick(%c,0)
- while (%i) { rw mode %c %m $nick(%c,%i) | dec %i }
- }
- alias mkick {
- var %c $$1, %n $$2-, %d 1
- KICK %c $gettok(%n, 1, 44)
- var %n $remtok(%n, $gettok(%n, 1, 44), 1, 44)
- if ($numtok(%n, 44)) { .timer -m 1 %d mkick %c %n }
- }
- ;Echos a link plus popups a window of the users profile
- alias profiles {
- if ($network == Sparkpea.Net) { var %n sparkpea.net/profile.php?epuid= }
- elseif ($network == PhreikNET) { var %n phreik.net/profile.msnw?epuid= }
- elseif ($network == Buzzen) { var %n buzzen.net/profile.aspx?pid= }
- echo -a * $1 Profile Link is12 http://www. $+ %n $+ $2
- window -apdk0w0 @ $+ $1 $+ 's[Profile] iconfile $mircdiricons\eXx.ico
- .noop -a $dll(dll\nHTMLn_2.95.dll,attach,$window(@ $+ $1 $+ 's[Profile]).hwnd))
- .noop -a $dll(dll\nHTMLn_2.95.dll,navigate, http://www. $+ %n $+ $2 )
- }
- ; Buzzen specific
- alias access { rw access $1- }
- alias bcnr { return $+($chr(37),$chr(35),$replace($remove($$1-,$chr(58),$chr(37),$chr(35)),$chr(32),\b)) }
- ;Thanks to Nick for the regx
- alias bcnstrip return $iif($network = Buzzen, $regsubex($1-, /\[(?:style\x20.*?|/style)\]/gi,$null), $1-)
- ;QUEUE
- ;Thanks extremity
- alias -l rw {
- hinc -m que total
- hadd que $hget(que,total) $1-
- if (!$hget(que,idx)) { hinc que idx }
- if (!$hget(que,run)) {
- hadd que run 1
- que
- }
- }
- alias -l que {
- :start
- var %i $hget(que,idx)
- .raw $hget(que, %i)
- hinc que idx
- if (11 // %i) {
- .timer -m 1 1300 que
- return
- }
- if (%i >= $hget(que, total)) {
- hdel que run
- .timerqr -m 1 1300 qclr
- return
- }
- goto start
- }
- alias -l qclr { if (!$hget(que,run)) {
- hdel que total
- hdel que idx 0
- }
- }
- ;RAWS
- raw *:*: {
- if (%raw == on) {
- if (!$window(raws)) { window @raws }
- echo -t @raws =========================
- echo -t @raws Number: $numeric
- echo -t @raws RawMsg: $rawmsg
- echo -t @raws Params: $1-
- echo -t @raws
- }
- if ($gettok($rawmsg,2,32) isin 002 003 004 005 251 265 329 353 366 422 803 804 805 914) { haltdef }
- elseif ($gettok($rawmsg,2,32) == WHISPER) { if (!$window($nick)) { query -n $nick } | set %buzzenwhisper. $+ $nick $1 | echo -t $nick $nick (7 $+ $1 $+ ) : $bcnstrip($3-) }
- elseif ($numeric == 403) { CREATE $2 | haltdef }
- elseif ($numeric == 801) { echo -t $2 5Added $3 to access for $4 | haltdef }
- elseif ($numeric == 332) { echo $2 3 $timestamp * Topic : $bcnstrip($3-) | haltdef }
- elseif ($numeric == 821) { var %n $mid($gettok($rawmsg,1,33),2-) | echo -t $1 7 %n has returned. | cline -m 2 $1 %n | haltdef }
- 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 } }
- elseif ($3 == PUID) { profiles $2 $4 }
- elseif ($2 == PID) { profiles $3 $4 }
- elseif ($numeric == 999) {
- var %i $scon(0)
- while (%i) {
- scon %i
- if ($chan(0) < 11) { join %lastjoin | haltdef }
- dec %i
- }
- server -m irc.buzzen.net -j %lastjoin | haltdef
- }
- }
- ;EVENTS/THEME
- on *:INPUT:#: {
- if ($left($1,1) != /) {
- rw PRIVMSG # $+(:,$iif($network = buzzen,%style $+ $1- $iif(%style,[/style]),$1-))
- echo -ti2 $chan 10 $+ $me $+ : $1-
- haltdef
- }
- }
- on *:INPUT:?: {
- if ($network == Buzzen) && ($left($1-,1) != /) && ($comchan($active,0) > 0) { rw WHISPER $comchan($active,1) $active $+(:,$1-,) }
- else { privmsg $active $1- }
- echo -ti2 $chan 1 $+ $me $+ : $1-
- haltdef
- }
- on ^*:TEXT:*:#: {
- if ($chr(37) isin $nick) { echo $chan 10 $timestamp * Welcome : $bcnstrip($1-) }
- else { echo -ti2 $chan 2 $nick $+ :14 $bcnstrip($1-) }
- haltdef
- }
- on ^*:ACTION:*:#: { echo -ti2 $chan 6* $nick $bcnstrip($1-) | haltdef }
- on *:CLOSE:?: { if (%buzzenwhisper. [ $+ [ $target ] ]) { unset %buzzenwhisper. [ $+ [ $target ] ] } }
- on ^*:NOTICE:*:*: {
- if ($nick != MemoServ) {
- if ($nick === NeoStats) { echo -a 12* Server Notice 01: $1- }
- elseif ($nick === opsb) { echo $chan 12* Server Notice 01: $1- }
- elseif ($nick == Global) && ($4 != from) { echo -s 12* Global Message from $network : 1 $1- }
- elseif ($nick == ChanServ) { echo $chan 14* Channel Message3: 14 $2- }
- haltdef
- }
- tokenize 32 $Rawmsg
- echo $chan $timestamp 5* Notice From $nick : $remove($$5,:) $6-
- haltdef
- }
- on ^*:SNOTICE:*: { echo -st 5* Server Notice: $1- | halt }
- on ^*:JOIN:#: {
- if ($nick == $me $nick == $me && $chr(37) isin #) { set # # | haltdef }
- var %a $readini(data\nicklog.ini,Nicklog,$address($nick,1))
- if (!%a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+($chr(44),$nick) }
- elseif (%a) && ($nick !isin %a) { writeini -n data\nicklog.ini Nicklog $address($nick,1) $+(%a,$chr(44),$nick) }
- else { echo $chan $numtok(%a,44) entries for %a }
- }
- on ^*:PART:#: {
- if ($nick == $me && $chr(37) isin #) { unset # # | haltdef }
- }
- on ^*:RAWMODE:#: {
- echo # $timestamp 7 $nick sets mode 1 $+ $1 7 $+ $2-
- haltdef
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement