Loading

Nick Identification scrip

  1. on *:start: {
  2.   timerupdatetitle -o 0 1 updatetitle
  3.   newday
  4.   fullname http://joshuacasey.net
  5.   mnick Joshua
  6.   .timestamp -f [yyyy-mm-dd HH:nn:ss]
  7. }
  8.  
  9. alias updatetitle {
  10.   titlebar $chr(151) $+ $chr(155) $asctime(dddd) $+ $chr(44) $asctime(mmmm ddoo) $+ $chr(44) $asctime(yyyy) $chr(149) $asctime(HH:nn:ss zzz)
  11.   ;  titlebar $chr(151) $+ $chr(155) $day $+ $chr(44) $date(mmmm) $date(dd) $+ $chr(44) $date(yyyy) $chr(151) $time(hh:nn:ss tt) $chr(40) $+ GMT: $time(zz) $+ $chr(41)
  12.   ;It is $time(HH:mm:ss) GMT $time(ZZ) on $day $chr(07)
  13. }
  14.  
  15. alias newday { timer -o 00:00 1 0 /print_newday }
  16. alias print_newday {
  17.   aline -ap @whois 14** $+($time(dddd),$chr(44),$chr(32),$time(mmmm),$chr(32),$time(dd),$chr(44),$chr(32),$time(yyyy),$chr(32),$time(HH:nn:ss)) **
  18.   aline -ap @awaylog 14** $+($time(dddd),$chr(44),$chr(32),$time(mmmm),$chr(32),$time(dd),$chr(44),$chr(32),$time(yyyy),$chr(32),$time(HH:nn:ss)) **
  19.   ;  aline -ap @notice.SwiftIRC 14** $+($time(dddd),$chr(44),$chr(32),$time(mmmm),$chr(32),$time(dd),$chr(44),$chr(32),$time(yyyy),$chr(32),$time(HH:nn:ss)) **
  20. }
  21.  
  22. on *:connect: {
  23.   $iif($ini(connect.ini,$network,Nick),nick $readini(connect.ini,n,$network,Nick))
  24.   $iif($network == Quakenet,auth $readini(connect.ini,n,$network,Nick) $decode($readini(connect.ini,n,$network,Pass),m),quote nickserv identify $decode($readini(connect.ini,n,$network,Pass),m))
  25.  
  26.   ;Oper Login for users that may have Oper permissions on a network
  27.   $iif($readini(connect.ini,n,$network,Oper) == Yes,oper $readini(connect.ini,n,$network,Ousername) $decode($readini(connect.ini,n,$network,Opass),m))
  28.  
  29.   $iif($readini(connect.ini,n,$network,Modes),mode $me $readini(connect.ini,n,$network,Modes))
  30. }
  31.  
  32. on ^*:NOTICE:Password accepted - you are now recognized*:?: {
  33.   if ($nick == NickServ) {
  34.     var %channeltotal $gettok($readini(connect.ini,n,$network,Channels),0,44)
  35.     join -x $gettok($readini(connect.ini,n,$network,Channels),1- %channeltotal,44)
  36.   }
  37. }
  38. on ^*:NOTICE:You are now identified for*:?: {
  39.   if ($nick == NickServ) {
  40.     var %channeltotal $gettok($readini(connect.ini,n,$network,Channels),0,44)
  41.     join -x $gettok($readini(connect.ini,n,$network,Channels),1- %channeltotal,44)
  42.   }
  43. }
  44. raw 396:*hidden host*: {
  45.   join -x $readini(connect.ini,n,$network,Channels)
  46. }
  47.  
  48. alias network {
  49.   if ($1 == addnick) {
  50.     .remini -n connect.ini $network Nick
  51.     .writeini -n connect.ini $network Nick $2
  52.     echo 14 -g Added $2 to $network
  53.   }
  54.   elseif ($1 == addpass) {
  55.     .remini -n connect.ini $network Pass
  56.     .writeini -n connect.ini $network Pass $encode($2,m)
  57.     echo 14 -g Added $encode($2,m) to $network
  58.   }
  59.   elseif ($1 == addmodes) {
  60.     .remini -n connect.ini $network Modes
  61.     .writeini -n connect.ini $network Modes $+(+,$remove($2,+))
  62.     echo 14 -g Added $+(+,$2) to $network
  63.   }
  64.   elseif ($1 == addoper) {
  65.     .writeini -n connect.ini $network Oper yes
  66.     .writeini -n connect.ini $network Ousername $2
  67.     .writeini -n connect.ini $network Opass $encode($3,m)
  68.     echo 14 -g Added $2 and $encode($3,m) to $network
  69.   }
  70.   elseif ($1 == addchan) {
  71.     .writeini -n connect.ini $network Channels $addtok($readini(connect.ini,n,$network,Channels),$2,44)
  72.     echo 14 -g Added $2 to $network
  73.   }
  74.   elseif ($1 == delchan) {
  75.     .writeini -n connect.ini $network Channels $remtok($readini(connect.ini,n,$network,Channels),$2,44)
  76.     echo 14 -g Removed $2 from $network
  77.   }
  78.   else {
  79.     echo 14 -g Usage: /network addnick Nick
  80.     echo 14 -g Usage: /network addpass Pass
  81.     echo 14 -g Usage: /network addmodes Modes
  82.     echo 14 -g Usage: /network addchan Channel1,Channel2,Channel3
  83.     echo 14 -g Usage: /network delchan channel
  84.     echo 14 -g Usage: /network addoper opername operpass
  85.   }
  86. }
  87.  
  88. ; Automatically identifies you if needed (if the nickname belongs to you
  89. ; On the specified network (requires settings in connect.ini) (USE /network alias from above)
  90. on ^*:NOTICE:*This nickname is registered and protected. If it is your*:?: {
  91.   if ($me == $readini(connect.ini,$network,Nick)) {
  92.     quote nickserv identify $decode($readini(connect.ini,n,$network,Pass),m)
  93.   }
  94. }
  95. on ^*:NOTICE:You have 30 seconds to identify to your nickname before it is changed.:?: {
  96.   if ($nick == NickServ) {
  97.     quote nickserv identify $decode($readini(connect.ini,n,$network,Pass),m)
  98.   }
  99. }
  100.  
  101. ; If nickname is already in use, and belongs to us (specified in connect.ini)
  102. ; Ghost the nickname, switch to it, and identify
  103. raw 433:*is already in use.: {
  104.   if ($2 == $readini(connect.ini,$network,Nick)) {
  105.     ;quote nickserv ghost $2 $decode($readini(connect.ini,n,$network,Pass),m)
  106.     nick $2
  107.     quote nickserv identify $decode($readini(connect.ini,n,$network,Pass),m)
  108.   }
  109. }

Comments