I am writing a script to detect the number of clones there are from a certain host on an irc network (not in a channel).
To do this i am getting the bot to do a /who +h host on the host of the user i wish to check for clones.
Then using a raw bind i want to catch the information and count the number of lines which have been returned from the server, as each line represents a clone.
So, if there are 2 users from a specific host the script catches some items from the who reply as follows:
the $keyw returns:proc rawwho {from keyw arg} {
putlog "$keyw"
}
which is fine, but i am having trouble getting it to count how many times it is being repeated. I thought that each line would be classed as one item in a list, but it appears that each responce is actually an individual item and not part of a list so i am a little stuck as to how to go forward, i just need to count the number of items displayed.<E> [15:35] Devel.BeforeNET.org
<E> [15:35] Devel.BeforeNET.org
any ideas?
thanks
Simon