Skip to Content

#eglug bot code is available.

MSameer's picture

Ok guys, the code written in perl, fastly cooked is available here.

The bot currently is playing on irc.freenode.net #eglug.

Nickname: eglug or na6oosh :-)

Maybe it'll change to XBill soon ? ;-)

Commands implemented:

eglug: arabeyes foo "lookup foo in the arabeyes english/arabic dictionary"

eglug: dict bar "lookup bar in the jargon file"

eglug: spell blah "use aspell/pspell to spellcheck the word"

eglug: google zot "it'll search google and return the I'm feeling lucky result."

I think nothing more currently.

Feel free to suggest features and to send patches.

DarKnesS_WolF's picture

Great work ;)

really great work uniball :) it`s soo helpfull for me in arabeyes matter ;) but can u add some stuff like

  • Google search will be great
  • !seen nickname command ( for the users that don`t know the /ns info nickname )

that will be great :) peace

MSameer's picture

google is there, I forgot to

google is there, I forgot to add it to the post, I've added it now.

seen is really a good idea, but i'm not free these days to think of how to implement it.

MSameer's picture

0.0.2 is out

heh, 0.0.2 is there, grab it to b0rk your favorite IRC Network ;-) Changes:

  • Use google web API to query google.

phaeronix's picture

!seen support for eglug bot

Sleepless boring night, everyone left to hurghada, and #eglug silent. Wanted to learn something new, I picked up something at random, PERL. Yuck.

--- bot-0.0.2-orig.pl 2005-04-28 08:27:45.000000000 +0200 +++ bot-0.0.2-seen.pl 2005-04-28 08:40:59.000000000 +0200 @@ -53,6 +53,7 @@ $conn->add_global_handler('376', \&on_connect); $conn->add_handler('public', \&on_public); $conn->add_handler('msg', \&on_msg); +$conn->add_handler('notice', \&on_notice); $irc->start; @@ -85,6 +86,12 @@ &return_back("$nick: Don't talk about my mother."); return; } +if (/^!seen/) +{ + &seen($arg); + return; +} + $arg =~ /^$mynick:/i || return; $arg = substr($arg, length($mynick)+1); @@ -217,6 +224,30 @@ print "*** @args\n"; } +sub on_notice { + my ($self, $event) = @_; + + if ($nick eq 'SeenServ'){ + &return_back("$body\n"); + #print "*** NOTICE: ($nick)($body)\n"; + } + return; +} + +sub seen { + my $arg = shift; + #print "*** arg = $arg\n"; + $arg =~ s/!seen //s; + #print "*** arg = $arg\n"; + + $conn->privmsg("SeenServ", "SEEN $arg"); + + return; +} + + sub google {
  1. &return_back("B0rked.");
  2. return;
MSameer's picture

seenserv is b0rked. Sorry can

seenserv is b0rked. Sorry can't use it !

Anyway I'm planning to rewrite na6oosh soon!

Quote "c u next life time then when i come back as a mug of tea :P"

phaeronix's picture

I knew you'd say that. As if

I knew you'd say that. As if it's my fault that seenserv is b0rked. Just being your *** self ;)

MSameer's picture

I didn't say that. I said

I didn't say that.

I said that seenserv is b0rked and I'm NOT going to add your patch because of that.

Quote "c u next life time then when i come back as a mug of tea :P"

phaeronix's picture

anyway

Anyway seenserv is not broken. I was using "/seenserv seen" instead of "/seenserv seennick" . now it will work with nickchanging. Then new patch will also integrate the seen response in the bot's responses.

For example :

have you seen Uniball ?

did you see Uniball recently ?

MSameer's picture

It's b0rked, try both and see

It's b0rked, try both and see.

Please don't waste your time!

Quote "c u next life time then when i come back as a mug of tea :P"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Dr. Radut | forum