Re: Gump3 and IRC

2005-06-28 Thread Adam R. B. Jack

 bash gump run [EMAIL PROTECTED]/#asfgump

Ok, that needs quoting, i.e.

--irc='[EMAIL PROTECTED]/#asfgump'

which is what I just added to gump3 on VmGump. If we find it too chatty we
could move it to #asfgumprun or something like that.

Which remind me. Folks who want to, ought add this to their channels list.

irc://irc.freenode.net/#asfgump

It would be good to get a few more folks in there more often.

 The plugin uses:

 http://sourceforge.net/projects/irclib/

Nope, the correct URL is:

http://sourceforge.net/projects/python-irclib

for which I did 'python setup.py install' and 'python2.4 setup.py install'
on vmgump.

regards,

Adam


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Gump3 and IRC

2005-06-27 Thread Adam Jack
I've been tinkering with an IRC plug-in for Gump3 that allows it to interact
with an IRC channel.

Given how long our runs are, it seems reasonable that we'd like to interact
with them in real-time. Theoretically Gump3 could (one day) become a
long-lived IRC bot that took requests/instructions (i.e. build this, re-load
this metadata, etc.) but I think this is a good first tinker. We'll see what
we think of this, and if it proves useful.

To configure this plugin simply type:

bash gump run [EMAIL PROTECTED]/#asfgump

to have the nickname gump3 connect to channel #asfgump.

BTW: --debug will make it more verbose.

Right now this is experimental. It takes commands (replying to the
requesting user) and
gives output on start-up/shutdown and all module/project
process/skip/failure. The commands it processes are:

1) version -- what version are you?
2) help -- tell me how to talk to you.
3) disconnect -- go away.
4) die -- really really go away. [We'll see if we have issues w/ this or
not.]
5) ... ok, we need some real ones next. e.g. querying the run order, eta of
X, status of X, enable/disable debug, etc. etc.

The plugin uses:

http://sourceforge.net/projects/irclib/

Which (despite documentation lackings) is functional enough, it seems 
lighter weight than some of the others I've looked at. That said, I'm game
to switch should we find a better candidate.

There are a few issues w/ the current implementation:

1) If the gump run is short (a few seconds long) the IRCbot doesn't get
chance to log in.
2) The shutdown doesn't appear clean (it exists the IRC channel, but not
stating done.) For me (on win32) the thread.join seems to exit prematurely,
so I've hacked in a nasty sleep. I'll test this on other OSes.
3) Sometimes a run simply fails to connect (for no obvious reason.) Maybe
this is due to some spambot avoidance at irc.freenode.net, who knows.

Let me know your thoughts on this.

regards

Adam


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Gump3 and IRC

2005-06-27 Thread Leo Simons
Adam Jack wrote:
 I've been tinkering with an IRC plug-in for Gump3 that allows it to interact
 with an IRC channel.

Whoah! Cool! Is this up and working on any of our servers atm? Can we
fix up a cronjob somewhere to enable this?

(...)
 Let me know your thoughts on this.

I like.

Have only looked at the code real briefly. Looks nice. One thing I
noticed...

# What is the request?
+if cmd == 'version':
+c.notice(peer_nick,'%s:%s' % (GUMPBOT_NAME, GUMPBOT_VERSION))
+elif cmd =='help':
+c.notice(peer_nick,'help,disconnect,die,stats,dcc,version')
+elif cmd == disconnect:
+self.disconnect()
+elif cmd == die:
+self.die()
+elif cmd == stats:

...doesn't scale if we want to do a whole lot of this (which I'm not too
sure of). The next step up would be some kind of a table, probably...

# pseudocode which probably won't compile
CMDS = {'version': handle_version_cmd,
'help': handle_help_cmd
# ...
   }
# ...
  self.peer_nick = nm_to_n(e.source())
  if CMDS.has_key(cmd):
command_function = CMDS.get(cmd)
command_function(bot=self)
  else:
self.connection.notice(self.peer_nick, Not understood:  + cmd)

If we don't want to flexibilize, it's great to see how little code we
need to make this work. Maybe we could have even less code on the
push-messages side of things by having logging configured to go to a
channel in some way...no idea if functionality exists for that. But
that's basically design-ahead-of-need, for now this is nice.

The other top-of-head idea is that its nice to have a persistent bot,
e.g. one that we can actually tell to fire up a gump run (or stop one,
or list active ones). That would probably require an out-of-process
server and some kind of remote procedure calls??

(...)

The final obvious thought is it will take time to figure out the
interactions and/or notifications that we would want on IRC, but it
would be nice to note how to do it and how easy it is to add commands.

cheers  gnight/morning,

LSD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Gump3 and IRC

2005-06-27 Thread Adam R. B. Jack

Adam Jack wrote:

I've been tinkering with an IRC plug-in for Gump3 that allows it to interact
with an IRC channel.


Whoah! Cool! Is this up and working on any of our servers atm? Can we
fix up a cronjob somewhere to enable this?


I'm not able to get my SSH tunnel to work right now (since the upgrade 
perhaps?), so mail access will be hampered. I'm on IRC if you want me through. 
;-) If VmGump were up we ought be able to add [EMAIL PROTECTED]/#asfgump to 
there.

regards,

Adam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]