Now I have a last question. Is this possible: If someone in the channel writes "!medals" my bot looks for his name in the textfile and says for example:"$nick has 2 MVP Medal(s) and 1 MostKills Medal(s)". If the bot could not find the name in the textfile it should say: "$nick has no medals yet."
you can creat a modified copy of the above script. [lindex $line 1] and [lindex $line 2] will contain the counter of the medals and if lsearch returns -1, there is no record of medals of him.
well, I would have used a 'return 1' at the end, used puthelp instead of putquick and changed the r+ to r, since we nolonger need to open the file in read and write modus , but its exactly that what I thought you should make .
The bot seems to have problems with this nick: {{As}masterblast{GEN}}
It does not make an own line for each time, but it makes a new line everytime for this nick, when it has MVP or MostKills.
Does anyone know why?
does the nick stand in the text file exactly like that, or are the {} excaped with \?
Maybe lsearch doenst find it, because of the sublist. You could try to use
Yes in the textfile, there is exactly that nick. When I type "!medals {{As}masterblast{GEN}}" lsearch find this nick. But when I want to store this nick a new line is made everytime. What do you mean with
Start using your brain man, there is only line that uses similar vars with lappend. But strange that he finds the nick and creates a new entry anyway... thats irrationel .