Advertisement
Aha2Y

Untitled

Aug 1st, 2011
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.07 KB | None | 0 0
  1. alias socket.trivbot {
  2.   sockclose trivia
  3.   set %trivia.server $server
  4.   socklisten trivia $rand(100,500)
  5.   sockopen trivia_x %trivia.server 6667
  6. }
  7.  
  8. on *:socklisten:trivia: {
  9.   var %_trivia = $r(1,500)
  10.   sockaccept trivia_ [ $+ [ %_r ] ]
  11.   sockclose trivia
  12. }
  13.  
  14. on *:sockopen:trivia_x: {
  15.   sockwrite -n trivia_x nick TrivBot
  16.   sockwrite -n trivia_x user TrivBot . . . TrivBot
  17. }
  18.  
  19. on *:sockread:trivia*: {
  20.   sockread %_trivia
  21.   tokenize 32 %trivia
  22.   var %_ntoks3 = $numtok($1-,44)
  23.   if (%_ntoks3 == 2 && $1 isnum && $3 isnum) {
  24.     sockwrite -n $sockname $3 , $1 : USERID : UNIX : TrivBot
  25.   }
  26.   if ($1 == PING && $2) { sockwrite -nt $sockname PONG $2- }
  27.   if (:* iswm $4 && $4 != :VERSION) { set %socket.version TrivBot v1, By Aha2Y | .signal version $1- }
  28.   if ($1 == PING && $2) { sockwrite -nt $sockname PONG $2- }
  29.   if ($2 == 376) { $tip(FunBots ,Sockets,TrivBot connected to $network) | sockwrite -nt $sockname Join #LunaQ }
  30. }
  31.  
  32. on *:SOCKCLOSE:trivia*: {
  33.   sockclose trivia
  34.   sockclose trivia_x
  35.   $tip(FunBots,Sockets,TrivBot disconnected from $network
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement