Advertisement
makimaki

Unleashed RAW

Aug 24th, 2010
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 10.09 KB | None | 0 0
  1. ; |################################################|
  2. ; |********** Unleashed Raw Connection ************|
  3. ; |***************** By Maki **********************|
  4. ; |################################################|
  5. ;Basic Simple Clean Connection, with que, Autojoin, Allow list for whispers, and Basic Menus,
  6. ;A big Thank you to:
  7. ;Phreik Server, The gang in AH, To My Friends that support me, and my baby
  8. ;Shout out to:
  9. ;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)
  10.  
  11. ; |#########################|
  12. ; |***      STARTUP      ***|
  13. ; |#########################|
  14.  
  15. on *:start:{
  16.   $iif(!dirdata,mkdir data,)
  17.   .timestamp -f hh:nn:sstt
  18.   .titlebar  Unleashed Raw Phreik.NET Connection
  19.   echo -sa * Unleashed Raw Phreik.NET Connection
  20.   server irc.phreik.net
  21. }
  22.  
  23. ; |#########################|
  24. ; |***       LOGON       ***|
  25. ; |#########################|
  26.  
  27. on *:connect: {
  28.   if (!%phreik) { cookie }
  29.   .mode $me +c | account %phreik
  30.   $iif($pcnr(Main,autojoin) == on,autojoin,)
  31. }
  32.  
  33. alias cookie {
  34.   set %phreik $$?="Enter User Name:" $$?="Enter Your Password:"
  35.   if ($sock(cookie)) sockclose cookie
  36.   sockopen cookie www.phreik.net 80
  37. }
  38.  
  39. 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) }
  40.  
  41. on *:SOCKREAD:cookie:{
  42.   if ($sockerr > 0) return | var %sc
  43.   sockread %sc | if (!%sc) return | tokenize 32 %sc  
  44.   if ($2 == VALID:) { echo 1 -s  - Login successful, cookie created. | set %phreik $4- | account %phreik }
  45.   elseif ($2 == ERR:) { echo 4 -s  - Invalid username or password, restart. | unset %phreik }
  46. }
  47.  
  48. ; |#########################|
  49. ; |***      ALIAS        ***|
  50. ; |#########################|
  51.  
  52. alias debug { debug -pt @ $+ $network }
  53. alias restart { disconnect | /run mirc.exe | exit }
  54. alias sc { rw who $active }
  55. alias autojoin {
  56.   var %n $numtok(%autojoin, 32), %i $1
  57.   inc %i
  58.   if (%i > %n) { return }
  59.   join $gettok(%autojoin, %i, 32)
  60.   .timer 1 2 autojoin %i
  61. }
  62.  
  63. ;msg alias
  64. alias msg { rw privmsg  # : $1- | echo -ti2 $chan $pcnl < $+ $nick $+ >1 $1- }
  65. alias wmsg { rw privmsg $1 : $2- | echo -ti2 $1 $pcnl < $+ $nick $+ >1 $2- }
  66.  
  67. ;Modes,Kicks ect
  68. alias access { rw access $1- }
  69. alias kick { rw kick $1- }
  70. alias mode { rw mode $1- }
  71. alias prop { rw prop $1- }
  72.  
  73. ;Switchs On/off Options
  74. ;Syntex [$pcnr(#,Option)] - [pcnw # option  on/off]
  75. alias pcnr { return $readini(data\settings.ini, $1, $2) }
  76. alias pcnw { writeini -n data\settings.ini $1- | echo 3 # * $2- }
  77.  
  78. ;Theme OP lvl
  79. alias pcnl {
  80.   if ($Nick(#, $nick, ')) && (Bot isin $nick || Guide_ isin $nick || Sysop_ isin $nick || Admin_ isin $nick) { return 4Staff }
  81.   elseif ($nick isowner #) { return 8Owner }
  82.   elseif ($nick isop #) { return 5Host }
  83.   elseif ($nick isvo #) { return 10Voice }
  84.   else return 14User
  85. }
  86.  
  87. ;Que stops flood out
  88.  
  89. alias -l rw {
  90.   hinc -m que total
  91.   hadd que $hget(que,total) $1-
  92.   if (!$hget(que,idx)) { hinc que idx }
  93.   if (!$hget(que,run)) { que }
  94. }
  95. alias -l que {
  96.   :start
  97.   hadd -u2 que run 1
  98.   var %i $hget(que,idx)
  99.   .raw $hget(que, %i)
  100.   hinc que idx
  101.   if (11 // %i) { .timer -m 1 1300 que | return }
  102.   if (%i >= $hget(que, total)) { hdel que run | .timerqr -m 1 1300 qclr | return }
  103.   goto start
  104. }
  105. alias -l qclr { if (!$hget(que,run)) { hdel que total | hdel que idx 0 } }
  106. alias ct {
  107.   var %i 0
  108.   while (%i <= $1) {
  109.     msg  : $2- %i
  110.     inc %i
  111.   }
  112. }
  113.  
  114. ; |#########################|
  115. ; |***       RAWS        ***|
  116. ; |#########################|
  117.  
  118. raw *:*: {
  119.   if (%raw == on) {
  120.     if (!$window(raws)) { window @raws }
  121.     echo -t @raws =========================
  122.     echo -t @raws   Number: $numeric
  123.     echo -t @raws   RawMsg: $rawmsg
  124.     echo -t @raws   Params: $1-
  125.     echo -t @raws  
  126.   }
  127.   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 }
  128.   elseif ($numeric == 306) {
  129.     var %x 1 | var %n = $chan(0)
  130.     while (%x <= %n) {
  131.       cline -l $color(gray) $chan(%x) $fline($chan(%x),$me,1,1) | echo $color(mode) -ti2 $chan(%x) *  You are now away: $2-
  132.       inc %x
  133.     }
  134.     haltdef
  135.   }
  136.   elseif ($numeric == 305) {
  137.     var %x 1 | var %n = $chan(0)
  138.     while (%x <= %n) {
  139.       cline -lr $chan(%x) $fline($chan(%x),$me,1,1) | echo $color(mode) -ti2 $chan(%x) * You have returned
  140.       inc %x
  141.     }
  142.     haltdef
  143.   }
  144.   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 }
  145.   elseif ($numeric == 341) { echo $color(invite) -ta * $2 has been invited to $3 | haltdef }
  146.   elseif ($numeric == 401) { echo $color(info2) -ta * $2- | haltdef }
  147.   elseif ($numeric == 474) { echo 4 -t * Warrning Nick, Passport, or IP  Has Been Banned From ( $+ 5 $2 $+  ). | haltdef }
  148.   elseif ($numeric == 801) { echo 5 -t $2 Added $3 to access for $4  | haltdef }
  149.   elseif ($numeric == 822) {
  150.     var %x 1 | var %n = $comchan($nick,0)
  151.     while (%x <= %n) {
  152.       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)
  153.       inc %x
  154.     }
  155.     if ($window($nick) == $nick) echo $color(mode) -t $nick * $nick is now away
  156.     haltdef
  157.   }
  158.   elseif ($numeric == 821) {
  159.     var %x 1 | var %n = $comchan($nick,0)
  160.     while (%x <= %n) {
  161.       echo $color(mode) -ti2 $comchan($nick,%x) * $nick has returned | cline -lr $comchan($nick,%x) $fline($comchan($nick,%x),$nick,1,1)
  162.       inc %x
  163.     }
  164.     if ($window($nick) == $nick) echo $color(mode) -t $nick * $nick has returned
  165.     haltdef
  166.   }
  167.   elseif ($3 == PUID) {
  168.     echo -a * $2 Profile Link is12 http://www.phreik.net/profile.msnw?epuid= $+ $4
  169.     run http://www.phreik.net/profile.msnw?epuid= $+ $4
  170.   }
  171. }
  172.  
  173. ; |#########################|
  174. ; |***    THEME/EVENTS   ***|
  175. ; |#########################|
  176.  
  177. on *:INPUT:#: { if ($left($1,1)  != /) { rw PRIVMSG # $+(:,$1-) | echo  -ti2 $chan $pcnl < $+ $nick $+ >1 $1- | haltdef } }
  178. on ^*:TEXT:*:#: { echo  -ti2 $chan $pcnl < $+ $nick $+ > 1 $remove($1-,S eTahoma;0) | haltdef }
  179. on ^*:OPEN:?: { if ($pcnr(Main,Whispers) != on) && (!$istok(%allow, $nick, 32),1) { haltdef } }
  180. on *:OWNER:*:{
  181.   if ($opnick == $me) {
  182.   access # add owner *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
  183.   elseif ($nick == $me) { access # add owner *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
  184. }
  185. on *:OP:*:{
  186.   if ($opnick == $me) { access # add host *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
  187.   elseif ($nick == $me) { access # add host *! $+ $ial($opnick).user $+ @* Access-Timer $dc($me) }
  188. }
  189.  
  190. ; |#########################|
  191. ; |***       MENUS       ***|
  192. ; |#########################|
  193.  
  194. menu MENUBAR {
  195.   -
  196.   Update Account : cookie
  197.   $iif($pcnr(Main,autojoin) = on, $Style(1)) Auto Join On Start: $iif($pcnr(Main,autojoin) = on, pcnw Main Autojoin off, pcnw Main Autojoin on)
  198.   $iif($pcnr(Main,Whispers) = on, $Style(1)) Enable Whispers: $iif($pcnr(Main,Whispers) = on, pcnw Main Whispers off, pcnw Main Whispers on)
  199.   -
  200. }
  201. menu STATUS {
  202.   -
  203.   Account : Cookie
  204.   Channel List: list
  205.   -
  206. }
  207. menu CHANNEL {
  208.   -
  209.   $remove(#,$chr(35)) Option's
  210.   .Set Modes: MODE # $$?="Enter mode to change ie(+m or -m):"
  211.   .-
  212.   .Owner key: PROP # OWNERKEY $$?="Enter new owner key"
  213.   .Host key: PROP # HOSTKEY $$?="Enter new  host key"
  214.   .Voice key: PROP # VOICEKEY $$?="Enter new voice key"
  215.   .-
  216.   .Topic: TOPIC # $$?="Enter new topic"
  217.   .Onjoin: PROP # ONJOIN $+(:,$$?="Enter new onjoin message")
  218.   .$style($iif($istok(%autojoin, #, 32),1)) Auto Join : set %autojoin $iif($istok(%autojoin, #, 32), $remtok(%autojoin, #, 32) , $addtok(%autojoin, #, 32))
  219.   Channel Lister: list
  220.   Invite: invite $$="Nick to invite:" $$="Channel inviting to:"
  221.   -
  222.   Away
  223.   .Away: Away $$?="Reason"
  224.   .Return : Away
  225.   -
  226. }
  227. menu QUERY {
  228.   -
  229.   $style($iif($istok(%allow, $1, 32),1)) Allow Whispers : set %allow $iif($istok(%allow, $1, 32), $remtok(%allow, $1, 32) , $addtok(%allow, $1, 32))
  230.   -
  231. }
  232. menu NICKLIST {
  233.   $1 Info
  234.   .Copy Nick: echo -a * Nickname copyed to clip board: $1 | clipboard $1
  235.   .Profile : .Prop $1 PUID
  236.   .Idle $nick($chan,$1).idle $+ : echo -ae * $1 Idle Time : $nick($chan,$1).idle
  237.   .Address $iif($Ial($$1).addr,$ial($$1).addr,N/A) $+ : echo -ae * Address: $Ial($1)
  238.   -
  239.   $iif($$1 isowner #,$style(1)) · $chr(32) Owner: { mode # $iif($1 isowner #,-q,+q) $1  }
  240.   $iif($$1 isop #,$iif($$1 !isowner #,$style(1))) · $chr(32) Host: { mode # $iif($1 isop #,-o,+o) $1 }
  241.   $iif($$1 isvo #,$style(1)) · $chr(32) Voice: { mode # $iif($1 isvo #,-v,+v) $1 }
  242.   -
  243.   $style($iif($istok(%allow, $1, 32),1)) Allow Whispers : set %allow $iif($istok(%allow, $1, 32), $remtok(%allow, $1, 32) , $addtok(%allow, $1, 32))
  244.   Ignore
  245.   .Add: ignore -w $address($1,1)
  246.   .Remove: ignore -rw $address($1,1)
  247.   -
  248.   CTCP
  249.   .Time:.ctcp $1 TIME
  250.   .Version:.ctcp $1 VERSION
  251.   .Finger:.ctcp $1 FINGER
  252.   -
  253.   Channel Accses
  254.   .Add Owner : ACCESS # ADD OWNER *! $+ $ial($$1).user $+ @* 0 : Owner
  255.   .Remove Owner: ACCESS # DELETE OWNER *! $+ $ial($$1).user $+ @*
  256.   .-
  257.   .Add Host: ACCESS # ADD HOST *! $+ $ial($$1).user $+ @* 0 : Host
  258.   .Remove Host : ACCESS # DELETE HOST *! $+ $ial($$1).user $+ @*
  259.   .-
  260.   .Clear Owners : access $chan clear owner
  261.   .Clear Hosts :  access $chan clear host
  262.   .Clear Denys : access $chan clear deny
  263.   .Clear ALL : access $chan clear all
  264.   .List Access:access #
  265.   -
  266.   $iif($me !isop #,$style(2)) Quick Kick: kick # $$1
  267.   $iif($me !isop #,$style(2)) Custom Kick: kick # $$1 $$?="Kick MSG:"
  268.   -
  269.   $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 }
  270.   $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:" }
  271.   -
  272. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement