alias irc.bot {
if ($1 == -d) { sockclose ircbot }
if ($1 == -c) { sockopen ircbot <server> <port> | sockmark IRCBot $iif($active == $chan($active),$active,$comchan($me,1)) }
}
on *:SOCKOPEN:IRCBOT:{
sockwrite -nt $sockname NICK Groups
sockwrite -nt $sockname USER GROUPS $rand(11,99) $rand(11,99) $rand(11,99) :Group&IRC Chat
sockwrite -nt $sockname JOIN <channel>
}
on *:SOCKREAD:IRCBOT:{
var %read
sockread %read
tokenize 32 %read
var %sn = $remove($mid($1,2,$calc($pos($1,!,1) -1)),!)
if ($1 == PING) { sockwrite -nt $sockname PONG $2 }
if ($2 == PRIVMSG) && ($chr(35) isin $3) { privmsg $sock($sockname).mark $upper(%sn) Says, $mid($4-,2) }
}
on *:TEXT:*:#:{
if ($sock(IRCBOT)) { .sockwrite -nt IRCBOT PRIVMSG <channel> $+(:,$msn.decode($nick),) says, $1- }
}
This is a small irc/group bot I made a while back, and I've only tested it on Vincula so I know for sure it works. Its not much I know, but if you want more added to it, then by all mean go right ahead. Enjoy.
oh before I forget.
make sure you change <channel> to the channel you wish the IRC part of the bot to join. And change the <server> and <port> to the server and port you want it to connect to.
Also I made this for a group a while back, but I couldnt get it to work, mostly cuz I didnt have the time. But sense I have it working, I'd figure I'd post it. Actully this bot doesn't just work in groups but any channel on msn.
Commands:
/irc.bot -c/-d