Submitted by MSameer on Fri, 11/06/2004 - 16:14.

Ok guys, the code written in perl, fastly cooked is available here. The code is copyright © Mohammed Sameer , Released under the GPL License.

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.

get it from Here


Great work ;)

DarKnesS_WolF's picture

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

google is there, I forgot to

MSameer's picture

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.

-- Mohammed Sameer
Katoob Main developer
PekSysTray - GtkFlame

0.0.2 is out

MSameer's picture

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

  • Use google web API to query google.

-- I was known as Uniball!
Katoob Main developer
PekSysTray - GtkFlame

!seen support for eglug bot

phaeronix's picture

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

Anyway. I dove into Uniball's perl bot (http://www.eglug.org/bot), our beloved na6oosh. after a night of cursing and head scratching, and lots of googling, I got !seen support working.

--- 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);
 $conn->add_global_handler(251,252,253,254,302,255, \&on_init);
$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) = @_;
+ my $body = ($event->args)[0];
+ my $nick = ($event->nick)[0];
+
+ 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;

seenserv is b0rked. Sorry can

MSameer's picture

seenserv is b0rked. Sorry can't use it !

Anyway I'm planning to rewrite na6oosh soon!


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"

I knew you'd say that. As if

phaeronix's picture

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

I didn't say that. I said

MSameer's picture

I didn't say that.

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


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"

anyway

phaeronix's picture

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 ?

It's b0rked, try both and see

MSameer's picture

It's b0rked, try both and see.

Please don't waste your time!


-- I was known as Uniball!
WWW: http://www.foolab.org/
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.