1. Purpose 2. Examples 2.1. Distributing and combining mode commands: |
2.2. Combining without agents 3. Copying 4. Requirements 5. Downloading |
IRC Action combiner v1.5.4 for agent system like in BisqBot Copyright (C) 1992,2002 Bisqwit (http://iki.fi/bisqwit/) No warranty whatsoever. Distributed under the terms of GPL v2, see COPYING Usage: modecombiner [--notest] <agentdef> [<...>] /<op> [<opdef> [<...>]] --notest disables combining parameter limits. agentdef is: <nick>[:<load>[:<reliability>[:<hostload>]]] <channellist> channellist is: "<chan> [<...>]" For op='M', opdef is: <modestring> For op='K', opdef is: <kickstring> For op='T', opdef is: <topicstring> For op='G', opdef is: <msgstring> For op='N', opdef is: <noticestring> For op='Q', opdef is: <whoisstring> For op='O', opdef is: <functionstring> modestring is: "<chans> <modes> [<parameter> [<...>]]" kickstring is: "<chans> <nicks> <text>" topicstring, msgstring and noticestring are: "<chans> <text>" whoisstring is: "<nicks>" functionstring is: "<chan> <function> [<parameters> [<...>]]" chans is: <chan>[,<chan>[<...>]] nicks is: <nick>[,<nick>[<...>]] modes is a combination of alphabets and +/- signs. load is an unsigned integer, describing the load the agent has. reliability is an unsigned integer, bigger value meaning more reliable. hostload is an unsigned integer, used in functionstring; means host load. reliability value is used if two agents have equal chance otherwise. Output consists of lines of following format: <op> <nick> <command> op=W is a special case: it means there is no agent able to do the job for the particular channel. op=O is handled specially (no grouping happens).
modecombiner \ Agent1 '#c2' \ Agent2 '#c1 #c3 #c2' \ Agent3 '#c3' \ /M \ '#c1 +o bisqwit' \ '#c2 +mnsto bisqwit' \ '#c3 +ooo bisqwit bisqbot Agent2' \ '#c3,#c1 +v Mog' \ '#c4 +o bisqwit'Result:
W #c4 M +o bisqwit M Agent1 #c2 +omnst bisqwit M Agent2 #c1,#c3 +ov bisqwit Mog M Agent3 #c3 +ooo bisqwit bisqbot Agent1
M #Huffi +o Guffi M #Frumble +o nngh M #Frumble +o Zonk M #fozz +o nngh M #fozz +o Zonk M #Muffi +o Guffi M #fiuu +o nngh M #fiuu +o Zonk M #sc2.ja +o nngh M #sc2.ja +o Zonkand this shell command:
fn=tasklist.txt chanlist="$(echo `sed 's/^..//;s/ .*//' <$fn |sort|uniq`)" sed s/^..// <"$fn"|tr '\n' '\0'|xargs -0 modecombiner --notest _ "$chanlist" /MYou get this task list:
_ M #Huffi,#Muffi +o Guffi _ M #Frumble,#fozz,#fiuu,#sc2.ja +oo nngh ZonkOkay, this might not look as simple as it is, but the result is nice, isn't it?
Generated from progdesc.php
(last updated: Tue, 14 May 2002 17:37:37 +0300)
with docmaker.php
(last updated: Tue, 14 May 2002 17:30:47 +0300)
at Tue, 14 May 2002 17:37:37 +0300