Clomps irc

From Lundman Wiki
Revision as of 12:33, 2 June 2017 by Lundman (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Clomps-irc

A separate binary is compiled for the IRC Bot version of clomps. Clomps-irc connects to an IRC server(s), and sits in specified channel(s) to look for "New Release" notifications (or "Completion" messages depending on style).

To define an ircbot to listen to an irc server / irc channel, add the following line:

IRC | server=irc.server.com  | port=6667 | pass=ircpass | nick=clomps  | user=clomps@fxp.one | ssl=yes | fish=password | invite=username | channel=#bots |channel=#another
IRC | server=irc.server2.com | port=6667 | pass=ircpass | nick=clomps2 | user=clomps@fxp.one | ssl=no  | channel=#spew

Optionals are port, pass, ssl, fish, invite.

You need to defines the sites with SITE lines, for each one you intend to use. In this case, do not have a DIR= section.

SITE|NAME=ASite1|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s
SITE|NAME=glftpdsite|USESKIP=1|INCTEST=%s-(INCOMPLETE)|NUKETEST=NUKED-%s


Add a section:

TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB* 

NICK= Is a Regular Expression (RE) match on the nick name. Clomps will ignore other nicks. Here "(?i)" is the PCRE for "case-insensitive", matching on nick "thebot". MATCH is Regular Expression to match a release on. This does;

  • Match only on section "TV" (Since RE started with "[TV]")
  • Match on new release message ("New Release", which could also be "Completed" or similar messages), to differentiate to "New racer, New SFV, or Halfway-through announces).
  • Match and parse out the release name, ie "(.*)" and place it in "${releasename}". The part that is in parenthesis. This would unfortunately have to be tuned for each ircbot's output.
  • If "${releasename}" passes the ACCEPT and REJECT rules, in this case "*simpsons* and *FINSUB*;

If you need to use "|" in your regex, enclose the whole "MATCH=re" in quotes

TRADE|NICK=Test|"MATCH=.*|New Release|.* (.*?)"|SRC...

If you wish to do groupings, like "(cat|dog)" use the non-capturing (). ie,

(?:cat|dog)?

which will match either "cat", or "dog".

Specify REQUEUE if you wish FXP.One to continue queueing the release until completed. (If incoming to src is slower than src->dst link).

TRADE | NICK=(?i)thebot | MATCH=\[TV\] New Release: <.*?> (.*) | SRCSITE=ASite1 | SRCDIR=/tv | DSTSITE=glftpdsite | DSTDIR=/tv | ACCEPT=*simpsons* | REJECT=*FINSUB* | REQUEUE


The release is then moved from SRCSITE:/SRCDIR/${releasename} -> DSTSITE:/DSTDIR/${releasename}

Should we add SESSIONS=<int> as well? So clomps-irc can be told to limit the number of sessions? Some cases you only ever want to use SESSIONS=1, so all new releases are added to the end of currently active transfers.

If we allow SESSIONS=2 or more, should we add balancing? round-robin? least-entries-in-queue?


If all you care about is moving Completed releases, you should do the IRC match on the "Completed" message. This means you will wait until it is finished before it starts to move it. So, no racing.

However, if you want to move it as fast as possible, and participate in the racing, you should match on the "New Release" message. You probably also want to use REQUEUE keyword to make it retry until complete. However, if the source uploading is slower than the clomps trading connection, it might give up in the middle of a release (and leave an incomplete, if nobody else is racing), if this is an issue, it is recommended that you set clomps to match and trigger on both "New Release" and "Completed" messages. This ensures one final queuing to complete the release.