Advertisement
Aha2Y

Untitled

Aug 1st, 2011
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.47 KB | None | 0 0
  1. alias trivbot {
  2.   sockclose trivia
  3.   socklisten trivia 113
  4.   sockopen trivia_x $server 6667
  5. }
  6. on *:socklisten:trivia: {
  7.   var %_rb = $r(1,500)
  8.   sockaccept trivia_ [ $+ [ %_r ] ]
  9.   sockclose trivia
  10. }
  11.  
  12. on *:sockopen:trivia_x: {
  13.   sockwrite -n trivia_x nick TrivBot
  14.   sockwrite -n trivia_x user SocketBot . . . SocketBot
  15.   sockwrite -nt $sockname Join #LunaQ
  16.   noop $tip(FunBots ,Sockets,TrivBot connected to $network)
  17. }
  18.  
  19.  
  20. on *:sockopen:trivia*: {
  21.   sockwrite -nt $sockname nick TrivBot
  22.   sockwrite -nt $sockname user TrivBot . . . TrivBot
  23. }
  24.  
  25. on *:sockread:trivia*: {
  26.   sockread %_trivia
  27.   tokenize 32 %trivia
  28.   var %_ntoks2 = $numtok($1-,44)
  29.   if (%_ntoks2 == 2 && $1,$3 isnum) {
  30.     sockwrite -n $sockname $3 , $1 : USERID : UNIX : TrivBot
  31.   }
  32.   if ($1 == PING && $2) { sockwrite -n $sockname PONG $2- }
  33.   elseif (*!quote help* iswm %_trivia) { sockwrite -nt $sockname PRIVMSG $3 :Commands are, !quote add, !quote del, !quote stats }
  34.   elseif (:* iswm $4 && $4 != :VERSION) { set %socket.version TrivBot v1, By Aha2Y | .signal version $1- }
  35.   elseif (*.test* iswm %_trivia) { sockwrite -nt $sockname privmsg $3 test! }
  36. }
  37.  
  38. on *:SOCKCLOSE:trivia*: {
  39.   sockclose trivia
  40.   sockclose trivia_x
  41.   $tip(FunBots,Sockets,TrivBot disconnected from $network
  42. }
  43.  
  44. on *:signal:version: {
  45.   tokenize 33 $1-
  46.   set %string $remove($1-,$2)
  47.   tokenize 32 $1-
  48.   sockwrite -nt trivia_x NOTICE $remove(%string,:) $+($chr(1),VERSION) %socket.version
  49.   unset %socket.version
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement