Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias trivbot {
- sockclose trivia
- socklisten trivia 113
- sockopen trivia_x $server 6667
- }
- on *:socklisten:trivia: {
- var %_rb = $r(1,500)
- sockaccept trivia_ [ $+ [ %_r ] ]
- sockclose trivia
- }
- on *:sockopen:trivia_x: {
- sockwrite -n trivia_x nick TrivBot
- sockwrite -n trivia_x user SocketBot . . . SocketBot
- sockwrite -nt $sockname Join #LunaQ
- noop $tip(FunBots ,Sockets,TrivBot connected to $network)
- }
- on *:sockopen:trivia*: {
- sockwrite -nt $sockname nick TrivBot
- sockwrite -nt $sockname user TrivBot . . . TrivBot
- }
- on *:sockread:trivia*: {
- sockread %_trivia
- tokenize 32 %trivia
- var %_ntoks2 = $numtok($1-,44)
- if (%_ntoks2 == 2 && $1,$3 isnum) {
- sockwrite -n $sockname $3 , $1 : USERID : UNIX : TrivBot
- }
- if ($1 == PING && $2) { sockwrite -n $sockname PONG $2- }
- elseif (*!quote help* iswm %_trivia) { sockwrite -nt $sockname PRIVMSG $3 :Commands are, !quote add, !quote del, !quote stats }
- elseif (:* iswm $4 && $4 != :VERSION) { set %socket.version TrivBot v1, By Aha2Y | .signal version $1- }
- elseif (*.test* iswm %_trivia) { sockwrite -nt $sockname privmsg $3 test! }
- }
- on *:SOCKCLOSE:trivia*: {
- sockclose trivia
- sockclose trivia_x
- $tip(FunBots,Sockets,TrivBot disconnected from $network
- }
- on *:signal:version: {
- tokenize 33 $1-
- set %string $remove($1-,$2)
- tokenize 32 $1-
- sockwrite -nt trivia_x NOTICE $remove(%string,:) $+($chr(1),VERSION) %socket.version
- unset %socket.version
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement