If I search someting in the mysql db, after the results it shows someting like: 1 row in set (0.07 sec) Is there a way to use that info, so it can be announced in the irc channel? What i am looking for is the count of the result that it found and show that in the channel. I al ready tried it with: s...
I search the db and i cant find a good answer, so here's my question: My bot deops and devoice everyone who get +o or +v from a other oper/bot in the channel. Now no users are added to the bot. The section help tells this: Whenever a nick is opped on #channel, my bot deops them! Run through the foll...
ok that works, sort of. cnupdt = 7 cnt =175 7 x 100 / 175 = 4 so it announces -> 4 cnupdt = 5 cnt =175 5 x 100 / 175 = 2,86 but it announces -> 2 Is there a way it announce -> 2,86 ? http://www.tcl.tk/man/tcl8.4/TclCmd/expr.htm expr 5 / 4 returns 1, while expr 5 / 4.0 return 1.25 I tried set perc [e...
I have to colums: "nm" and "update" To count the inputs i use the folowing codes: set cnt [mysqlsel $db "select count(*) from $table WHERE nm = '$text';" -list] set cnupdt [mysqlsel $db "select count(*) from $table WHERE update = '$text';" -list] This gives an...
When someone query's the db it returns announcement to irc channel: like this: <botname> sending latest results: (the max results is set to 10) Now I want to let it announce how many records of that query it has found in the db, so i added to the script: set cnt [mysqlsel $db "select count(*) f...
set data [mysqlsel $db "select *,SEC_TO_TIME(unix_timestamp(now()) - unix_timestamp(pretime)) as data from $table WHERE nick like '%$keyed%' GROUP BY data;" -list]
to calculate the time difference between addtime and time now.
While testing the script, i found a problem The script I use, stores nicks with date and time in mysql db The row, thats stores date now, is called addtime: Made it like this: 'addtime datetime' This row stores datetime like this 2007-01-17 20:11:43 The script uses: set data [mysqlsel $db "sele...
I need some help, i search around this forum, but couldnt find what im looking for. Here goes: Nicks are stored in a mysql database with the time the nick is added (datetime) like: 2007-19-01 20:01:02 (row is called "addtime") To find how long ago the nick was stored the script use the fol...
Hi, I have two questions, I hope someone can help me with it :D Me and my friends have a little channel, where we have a bot with a script that stores info of size and files of a release. The script works, but the problem is if someone adds info of a release and few hours later, someone else adds th...