Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] OT: a script involving an IRC connection
Date: Tue, 28 Jul 2009 23:44:08
1 Hi there,
3 I want to write a script that I'll run on my server & which will
4 connect to an IRC host and send a message to me if I'm logged on
5 there. It can then disconnect from the server (or just plain drop the
6 connection).
8 Any suggestions as to how to achieve this?
10 I'm reasonably proficient in Bash.
12 I think IRC protocol is fairly texty, so maybe I could use `expect` <
13 > to automate this. ??
14 (Is the correct package dev-tcltk/expect?)
16 But I believe I've been given to understand in the past that use of
17 `expect` is bad practice.
18 What if it doesn't receive the result it expects?
20 I believe Perl has some pretty good modules for interacting with IRC.
21 Would this be a good opportunity to learn Perl?
22 I'd rather do this the simplest way possible (that still wossisnames
23 best practices).
25 I think a full-blown eggdrop bot would be overkill for this simple task.
26 But I also wondered if it might be possible to call irissi with a
27 scripted set of '\server \nick my_messenger \msg nick
28 "Your message here"' commands?
30 Any thoughts?
32 Cheers,
34 Stroller.