Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; |################################################|
- ; |********** Unleashed Raw Connection ************|
- ; |***************** By Maki **********************|
- ; |################################################|
- ;Basic Simple Clean Connection, with que, Autojoin, Allow list for whispers, and Basic Menus,
- ;A big Thank you to:
- ;Phreik Server, The gang in AH, To My Friends that support me, and my baby
- ;Shout out to:
- ;Pania<3(K)(L), Leah(L)(F), Paul(B), Christain(B), James(B), Vipes(B), Andrew(Blowstick), Unk(F), Wispy(F), Peppa(F), and Cyra(F)
- ; |#########################|
- ; |*** STARTUP ***|
- ; |#########################|
- on *:start:{
- $iif(!dirdata,mkdir data,)
- .timestamp -f hh:nn:sstt
- .titlebar Unleashed Raw Phreik.NET Connection
- echo -sa * Unleashed Raw Phreik.NET Connection
- server irc.phreik.net
- }
- ; |#########################|
- ; |*** LOGON ***|
- ; |#########################|
- on *:connect: {
- if (!%phreik) { cookie }
- .mode $me +c | account %phreik
- $iif($pcnr(Main,autojoin) == on,autojoin,)
- }
- 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,Host: www.phreik.net,$crlf,Connection: close,$crlf,$crlf) }
- on *:SOCKREAD:cookie:{
- if ($sockerr > 0) return | var %sc
- sockread %sc | if (!%sc) return | tokenize 32 %sc
- if ($2 == VALID:) { echo 1 -s - Login successful, cookie created. | set %phreik $4- | account %phreik }
- elseif ($2 == ERR:) { echo 4 -s - Invalid username or password, restart. | unset %phreik }
- }
- ; |#########################|
- ; |*** ALIAS ***|
- ; |#########################|
- alias debug { debug -pt @ $+ $network }
- alias restart { disconnect | /run mirc.exe | exit }
- alias sc { rw who $active }
- alias autojoin {
- var %n $numtok(%autojoin, 32), %i $1
- inc %i
- if (%i > %n) { return }
- join $gettok(%autojoin, %i, 32)
- .timer 1 2 autojoin %i
- }
- ;msg alias
- alias msg { rw privmsg # : $1- | echo -ti2 $chan $pcnl < $+ $nick $+ >1 $1- }
- alias wmsg { rw privmsg $1 : $2- | echo -ti2 $1 $pcnl < $+ $nick $+ >1 $2- }
- ;Modes,Kicks ect
- alias access { rw access $1- }
- alias kick { rw kick $1- }
- alias mode { rw mode $1- }
- alias prop { rw prop $1- }
- ;Switchs On/off Options
- ;Syntex [$pcnr(#,Option)] - [pcnw # option on/off]
- alias pcnr { return $readini(data\settings.ini, $1, $2) }
- alias pcnw { writeini -n data\settings.ini $1- | echo 3 # * $2- }
- ;Theme OP lvl
- alias pcnl {
- if ($Nick(#, $nick, ')) && (Bot isin $nick || Guide_ isin $nick || Sysop_ isin $nick || Admin_ isin $nick) { return 4Staff }
- elseif ($nick isowner #) { return 8Owner }
- elseif ($nick isop #) { return 5Host }
- elseif ($nick isvo #) { return 10Voice }
- else return 14User
- }
- ;Que stops flood out
- alias -l rw {
- hinc -m que total
- hadd que $hget(que,total) $1-
- if (!$hget(que,idx)) { hinc que idx }
- if (!$hget(que,run)) { que }
- }
- alias -l que {
- :start
- hadd -u2 que run 1
- 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 } }
- alias ct {
- var %i 0
- while (%i <= $1) {
- msg : $2- %i
- inc %i
- }
- }
- ; |#########################|
- ; |*** 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 001 002 003 004 005 251 252 254 255 265 266 315 329 353 366 401 422 482 803 804 805 908 914) { haltdef }
- elseif ($numeric == 306) {
- var %x 1 | var %n = $chan(0)
- while (%x <= %n) {
- cline -l $color(gray) $chan(%x) $fline($chan(%x),$me,1,1) | echo $color(mode) -ti2 $chan(%x) * You are now away: $2-
- inc %x
- }
- haltdef
- }
- elseif ($numeric == 305) {
- var %x 1 | var %n = $chan(0)
- while (%x <= %n) {
- cline -lr $chan(%x) $fline($chan(%x),$me,1,1) | echo $color(mode) -ti2 $chan(%x) * You have returned
- inc %x
- }
- haltdef
- }
- elseif ($numeric == 352) { if (G isincs $7) cline -l $color(gray) $2 $fline($2,$6,1,1) | hadd -m unicks $6 $3-4 $7 $9 | echo -s * $6 4 $iif($9 = anon,Webchat,$iif(!$9,Unknown,$9-)) tag. 1(7 $2 1) | haltdef }
- elseif ($numeric == 341) { echo $color(invite) -ta * $2 has been invited to $3 | haltdef }
- elseif ($numeric == 401) { echo $color(info2) -ta * $2- | haltdef }
- elseif ($numeric == 474) { echo 4 -t * Warrning Nick, Passport, or IP Has Been Banned From ( $+ 5 $2 $+ ). | haltdef }
- elseif ($numeric == 801) { echo 5 -t $2 Added $3 to access for $4 | haltdef }
- elseif ($numeric == 822) {
- var %x 1 | var %n = $comchan($nick,0)
- while (%x <= %n) {
- echo $color(mode) -ti2 $comchan($nick,%x) * $nick is away: $1- | cline -l $color(gray) $comchan($nick,%x) $fline($comchan($nick,%x),$nick,1,1)
- inc %x
- }
- if ($window($nick) == $nick) echo $color(mode) -t $nick * $nick is now away
- haltdef
- }
- elseif ($numeric == 821) {
- var %x 1 | var %n = $comchan($nick,0)
- while (%x <= %n) {
- echo $color(mode) -ti2 $comchan($nick,%x) * $nick has returned | cline -lr $comchan($nick,%x) $fline($comchan($nick,%x),$nick,1,1)
- inc %x
- }
- if ($window($nick) == $nick) echo $color(mode) -t $nick * $nick has returned
- haltdef
- }
- elseif ($3 == PUID) {
- echo -a * $2 Profile Link is12 http://www.phreik.net/profile.msnw?epuid= $+ $4
- run http://www.phreik.net/profile.msnw?epuid= $+ $4
- }
- }
- ; |#########################|
- ; |*** THEME/EVENTS ***|
- ; |#########################|
- on *:INPUT:#: { if ($left($1,1) != /) { rw PRIVMSG # $+(:,$1-) | echo -ti2 $chan $pcnl < $+ $nick $+ >1 $1- | haltdef } }
- on ^*:TEXT:*:#: { echo -ti2 $chan $pcnl < $+ $nick $+ > 1 $remove($1-,S eTahoma;0) | haltdef }
- on ^*:OPEN:?: { if ($pcnr(Main,Whispers) != on) && (!$istok(%allow, $nick, 32),1) { haltdef } }
- on *:OWNER:*:{
- if ($opnick == $me) {
- access # add owner *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
- elseif ($nick == $me) { access # add owner *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
- }
- on *:OP:*:{
- if ($opnick == $me) { access # add host *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
- elseif ($nick == $me) { access # add host *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
- }
- ; |#########################|
- ; |*** MENUS ***|
- ; |#########################|
- menu MENUBAR {
- -
- Update Account : cookie
- $iif($pcnr(Main,autojoin) = on, $Style(1)) Auto Join On Start: $iif($pcnr(Main,autojoin) = on, pcnw Main Autojoin off, pcnw Main Autojoin on)
- $iif($pcnr(Main,Whispers) = on, $Style(1)) Enable Whispers: $iif($pcnr(Main,Whispers) = on, pcnw Main Whispers off, pcnw Main Whispers on)
- -
- }
- menu STATUS {
- -
- Account : Cookie
- Channel List: list
- -
- }
- menu CHANNEL {
- -
- $remove(#,$chr(35)) Option's
- .Set Modes: MODE # $$?="Enter mode to change ie(+m or -m):"
- .-
- .Owner key: PROP # OWNERKEY $$?="Enter new owner key"
- .Host key: PROP # HOSTKEY $$?="Enter new host key"
- .Voice key: PROP # VOICEKEY $$?="Enter new voice key"
- .-
- .Topic: TOPIC # $$?="Enter new topic"
- .Onjoin: PROP # ONJOIN $+(:,$$?="Enter new onjoin message")
- .$style($iif($istok(%autojoin, #, 32),1)) Auto Join : set %autojoin $iif($istok(%autojoin, #, 32), $remtok(%autojoin, #, 32) , $addtok(%autojoin, #, 32))
- Channel Lister: list
- Invite: invite $$="Nick to invite:" $$="Channel inviting to:"
- -
- Away
- .Away: Away $$?="Reason"
- .Return : Away
- -
- }
- menu QUERY {
- -
- $style($iif($istok(%allow, $1, 32),1)) Allow Whispers : set %allow $iif($istok(%allow, $1, 32), $remtok(%allow, $1, 32) , $addtok(%allow, $1, 32))
- -
- }
- menu NICKLIST {
- $1 Info
- .Copy Nick: echo -a * Nickname copyed to clip board: $1 | clipboard $1
- .Profile : .Prop $1 PUID
- .Idle $nick($chan,$1).idle $+ : echo -ae * $1 Idle Time : $nick($chan,$1).idle
- .Address $iif($Ial($$1).addr,$ial($$1).addr,N/A) $+ : echo -ae * Address: $Ial($1)
- -
- $iif($$1 isowner #,$style(1)) · $chr(32) Owner: { mode # $iif($1 isowner #,-q,+q) $1 }
- $iif($$1 isop #,$iif($$1 !isowner #,$style(1))) · $chr(32) Host: { mode # $iif($1 isop #,-o,+o) $1 }
- $iif($$1 isvo #,$style(1)) · $chr(32) Voice: { mode # $iif($1 isvo #,-v,+v) $1 }
- -
- $style($iif($istok(%allow, $1, 32),1)) Allow Whispers : set %allow $iif($istok(%allow, $1, 32), $remtok(%allow, $1, 32) , $addtok(%allow, $1, 32))
- Ignore
- .Add: ignore -w $address($1,1)
- .Remove: ignore -rw $address($1,1)
- -
- CTCP
- .Time:.ctcp $1 TIME
- .Version:.ctcp $1 VERSION
- .Finger:.ctcp $1 FINGER
- -
- Channel Accses
- .Add Owner : ACCESS # ADD OWNER *! $+ $ial($$1).user $+ @* 0 : Owner
- .Remove Owner: ACCESS # DELETE OWNER *! $+ $ial($$1).user $+ @*
- .-
- .Add Host: ACCESS # ADD HOST *! $+ $ial($$1).user $+ @* 0 : Host
- .Remove Host : ACCESS # DELETE HOST *! $+ $ial($$1).user $+ @*
- .-
- .Clear Owners : access $chan clear owner
- .Clear Hosts : access $chan clear host
- .Clear Denys : access $chan clear deny
- .Clear ALL : access $chan clear all
- .List Access:access #
- -
- $iif($me !isop #,$style(2)) Quick Kick: kick # $$1
- $iif($me !isop #,$style(2)) Custom Kick: kick # $$1 $$?="Kick MSG:"
- -
- $iif($me !isop #,$style(2)) Quick Ban: { access $chan clear HOST | access $chan clear OWNER | access # add deny $address($$1,2) 0 ( $+ $utfdecode($1) $+ ) Unleashed Ban | kick # $$1 Ban }
- $iif($me !isop #,$style(2)) Custom Ban: { access $chan clear HOST | access $chan clear OWNER | access # add deny $address($$1,2) $$?="Ban Minutes ?" ( $+ $utfdecode($1) $+ ) (Banlisted) | kick # $$1 $$?="Kick msg:" }
- -
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement