I am trying to do a script that uses MySQL to insert the values of users/ops/voices/normal from a certain channel. Now i know absolutley nothing about TCL-scripting so i checked out a few scripts that used MySQL and got the MySQL part up and working. I asked in #egghelp @ EFNet for help with the usercount part. Someone gave me this:
Code: Select all
set total [llength [chanlist #adaieski]]
set op [llength [chanlist #adaieski o]]
set voice [llength [chanlist #adaieski v]]
set normal [expr $total - $voice - $op]
total: 6 (that's right)
op: 1 (um, no, we were 6)
voice: 4 (ehh, no, no voices)
normal: 1 (yeah right)
now there can't be anything wrong with the MySQL code because I do a putcmdlog every time it updates and those values are the same as in the DB..
as i said, i don't know anything about TCL-scripting so if you know the answere please try to explain as much as possible.
and also, sorry about my bad english, I'm from sweden.
EDIT:
now the script updated the database again, now i got a little better results (using the same code):
total: 7
ops: 0
voice: 0
normal: 7
now there were 6 ops and 1 normal, still no voices.