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.
Help for those learning Tcl or writing their own scripts.
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Mon Apr 03, 2017 11:20 am
I have a tcl script the announces releases when someone does !pre
I noticed my bot is delayed and I have putquick. I changed that to putnow and when someone does !pre the bot no longer responds. I am running eggdrop 1.8
Once I have it back to putquick it responds.
Any help is appreciated.
willyw
Revered One
Posts: 1205 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Mon Apr 03, 2017 11:41 am
It would be helpful to see both.
It might be enough to see just both lines of tcl.
Best would be to pastebin the whole script.
Is the output more than just a couple lines?
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Mon Apr 03, 2017 12:07 pm
putquick "PRIVMSG $chan :\[\002\00314PRE\002\003 in \00310$type\003] - $rls ( [clock format $timestamp -format %m.%d.%Y] ) ( [clock format $timestamp -format %H:%M:%S] ) ( $size\00310MB\003 $files\00310F\003 $genre ) -- pred $ago ago" -next
willyw
Revered One
Posts: 1205 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Mon Apr 03, 2017 12:13 pm
intel wrote: putquick "PRIVMSG $chan :\[\002\00314PRE\002\003 in \00310$type\003] - $rls ( [clock format $timestamp -format %m.%d.%Y] ) ( [clock format $timestamp -format %H:%M:%S] ) ( $size\00310MB\003 $files\00310F\003 $genre ) -- pred $ago ago" -next
Is that line wrapped? Because it ends with a $ as if in the middle of a variable name.
That line also does not have an ending double quote.
Then... there were my other requests for info, too.
edit: Ok. Apparently you were editing your post at the same time as I was replying.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Mon Apr 03, 2017 12:28 pm
yup....I was editing it
willyw
Revered One
Posts: 1205 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Mon Apr 03, 2017 12:47 pm
intel wrote: yup....I was editing it
Ok.
I'll wait for the rest of the info.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Mon Apr 03, 2017 12:52 pm
that is the line....
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Mon Apr 03, 2017 2:10 pm
most ircds have throttle feature to prevent text floods perhaps ur bot is caught in that and therefore sending with a bit of delay
putnow sends directly to server wich might trigger anti throttle ( if massive text send and possibly might get disconnected )
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Mon Apr 03, 2017 4:22 pm
simo,
Don't think so cause someone else who has a bot can do it with no issues on the same ircd
When I am in the partyline for the and do !pre if there is a problem shouldn't I see something there? I don't see any issue. It just doesnt respond
juanamores
Master
Posts: 317 Joined: Sun Mar 15, 2015 9:59 am
Post
by juanamores » Mon Apr 03, 2017 6:28 pm
intel , could you copy the complete script so you can look at it and try to find the problem?
By chance, do you connect the BoT through a ZNC, bouncer or BNC?
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Sat Apr 08, 2017 9:40 pm
Code: Select all
proc ms:pre {nick uhost hand chan arg} {
set chan [string tolower $chan]
if {[channel get $chan search]} {
global mysql_ db_
set handle [mysqlconnect -host $mysql_(host) -user $mysql_(user) -pass $mysql_(password) -db $mysql_(db)];
set before [clock clicks -milliseconds]
set sea1 [string map [list "*" "%" " " "%" "" "%"] $arg];
set sea2 [string map [list "%" "*"] $sea1];
set query1 [mysqlsel $handle "SELECT $db_(rlsname),$db_(section),$db_(status),$db_(nukereason),$db_(ctime),$db_(files),$db_(size),$db_(genre) FROM $mysql_(table) WHERE $db_(rlsname) LIKE '%$sea1%' ORDER BY $db_(ctime) DESC LIMIT 5 " -flatlist];
if {$query1 == ""} {
putquick "PRIVMSG $chan : Nothing found for \037 $arg \037"
} else {
foreach {rls type nuke reason timestamp files size genre} $query1 {
set sea1 [string map [list "*" "%" " " "%" "" "%"] $arg];
set sea2 [string map [list "%" "*"] $sea1];
set query1 [mysqlsel $handle "SELECT $db_(rlsname),$db_(section),$db_(status),$db_(nukereason),$db_(ctime),$db_(files),$db_(size),$db_(genre) FROM $mysql_(table) WHERE $db_(rlsname) LIKE '%$sea1%' ORDER BY $db_(ctime) DESC LIMIT 5 " -flatlist];
if {$query1 == ""} {
putquick "PRIVMSG $chan : Nothing found for \037 $arg \037"
} else {
foreach {rls type nuke reason timestamp files size} $query1 {
set time1 [unixtime]
incr time1 -$timestamp
set ago [duration $time1]
set after [clock clicks -milliseconds]
if {$size != 0} {
if {$files != 0} {
if {$nuke == "0"} {
putquick "PRIVMSG $chan :\[\002\00314PRE\002\003 in \00310$type\003] - $rls ( [clock format $timestamp -format %m.%d.%Y] ) ( [clock format $timestamp -format %H:%M:%S] ) ( $size\00310MB\003 $files\00310F\003 $genre ) -- pred $ago ago"
} elseif {$nuke == "1"} {
putquick "PRIVMSG $chan :\[\0034NUKE\003\] ( \00310$type\003 ) -- $rls \002(\002 \037\0034$reason\037\003 \002)\002 was pred \0030::\003 ( [clock format $timestamp -format %m.%d.%Y] )\002 \002( [clock format $timestamp -format %H:%M:%S] ) ( $size\00310MB\003 $files\00310F\003 $genre ) -- pred $ago ago"
} else {
putlog "ERROR in (PRESEARCH)"
}
}
}
set ms "MS"
mysqlclose $handle
}
}
}
}
}
}
willyw
Revered One
Posts: 1205 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Sun Apr 09, 2017 9:15 am
That won't trigger with any command, because there is no bind .
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
intel
Halfop
Posts: 57 Joined: Tue Feb 26, 2008 11:51 pm
Post
by intel » Sun Apr 09, 2017 11:04 am
sorry there is a bind statement
bind pub -|- !pre ms:pre
willyw
Revered One
Posts: 1205 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Sun Apr 09, 2017 11:18 am
willyw wrote:
...
Best would be to pastebin the whole script.
...
juanamores wrote:
...
could you copy the complete script
...
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !