Feature #569

avatar

Event-triggered commands

Added by David Yip 5049 days ago. Updated 4014 days ago.

Status:Rejected Start:02/25/2011
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-
Complexity:

Votes: 0

Description

Presently, Smuxi has a mechanism for issuing commands on connection to an IRC server. This command list might look like this:

/msg NickServ IDENTIFY ...
/join #foo
/join #bar

These commands are sent in sequence to the IRC server on connect, and no command blocks.

However, sometimes one needs to wait for a command to complete before sending another command. Some IRC bots, for example, will only accept messages from you if you're already in the channel. If you try to do this with Smuxi's on-connect mechanism, i.e.

/join #channel
/msg ChannelBot do_something

it likely won't work, because the /msg is sent before the /join completes.

One way to tackle this is to issue commands in response to events. Mirco Bauer suggested something like this:

/on open_chat #channel /msg ChannelBot do_something
/join #channel

History

Updated by Mirco Bauer 4014 days ago

avatar
  • Status changed from New to Rejected

There are 2 solutions for this already in Smuxi:

/msg NickServ IDENTIFY ...
/sleep 3000
/join #foo

Or with Smuxi 0.10 by writing a hook which waits for the NickServ confirmation message and then sends the join commands, see https://smuxi.im/documentation/hooks/

Also available in: Atom PDF