This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Search found 13 matches

by heman
Sun Oct 07, 2007 4:11 pm
Forum: Scripting Help
Topic: mysql search count
Replies: 1
Views: 1594

mysql search count

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...
by heman
Sat Sep 01, 2007 5:08 pm
Forum: Eggdrop Help
Topic: bot deoping and devoicing
Replies: 1
Views: 1737

bot deoping and devoicing

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...
by heman
Mon Feb 05, 2007 6:25 am
Forum: Scripting Help
Topic: calculate % between two rows
Replies: 8
Views: 5096

ok that works, thanks.

Final question :D

the output now looks like for example:
2.85714285714 %
Is it possible it wil only announce the first one or two after the "." ?

So someting like:
2.85 %
And thanks for all the help
by heman
Mon Feb 05, 2007 5:44 am
Forum: Scripting Help
Topic: calculate % between two rows
Replies: 8
Views: 5096

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...
by heman
Sun Feb 04, 2007 7:14 pm
Forum: Scripting Help
Topic: calculate % between two rows
Replies: 8
Views: 5096

I tried

Code: Select all

set perc [expr { $cnupdt / $cnt * 100 }]
but results is : 0

Am I missing something?
by heman
Sat Feb 03, 2007 3:00 pm
Forum: Scripting Help
Topic: calculate % between two rows
Replies: 8
Views: 5096

calculate % between two rows

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...
by heman
Sat Feb 03, 2007 9:55 am
Forum: Scripting Help
Topic: different announcement by different count
Replies: 2
Views: 3017

that seems to work to :D

Thanks
by heman
Sat Feb 03, 2007 8:21 am
Forum: Scripting Help
Topic: different announcement by different count
Replies: 2
Views: 3017

different announcement by different count

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...
by heman
Sat Jan 20, 2007 2:11 pm
Forum: Scripting Help
Topic: error calculating datetime
Replies: 2
Views: 2580

Any idea how i can insert that into the script?

script us

Code: Select all

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.
by heman
Sat Jan 20, 2007 10:41 am
Forum: Scripting Help
Topic: convert timeago mysql
Replies: 2
Views: 2414

that worked :)

Thanks.


But now I have an other problem while testing the script :(

So please take a look at:
http://forum.egghelp.org/viewtopic.php?p=69757#69757

Thanks
by heman
Sat Jan 20, 2007 10:39 am
Forum: Scripting Help
Topic: error calculating datetime
Replies: 2
Views: 2580

error calculating datetime

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...
by heman
Fri Jan 19, 2007 6:43 pm
Forum: Scripting Help
Topic: convert timeago mysql
Replies: 2
Views: 2414

convert timeago mysql

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...
by heman
Sat Dec 30, 2006 3:34 pm
Forum: Scripting Help
Topic: delete info from db and skip on dupe
Replies: 0
Views: 2075

delete info from db and skip on dupe

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...