| View previous topic :: View next topic |
| Author |
Message |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Apr 03, 2017 11:20 am Post subject: Putnow / Putquick |
|
|
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. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Mon Apr 03, 2017 11:41 am Post subject: Re: Putnow / Putquick |
|
|
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 ! |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Apr 03, 2017 12:07 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Mon Apr 03, 2017 12:13 pm Post subject: |
|
|
| 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 ! |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Apr 03, 2017 12:28 pm Post subject: |
|
|
yup....I was editing it  |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Mon Apr 03, 2017 12:47 pm Post subject: |
|
|
| 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 ! |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Apr 03, 2017 12:52 pm Post subject: |
|
|
| that is the line.... |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Mon Apr 03, 2017 2:10 pm Post subject: |
|
|
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 ) |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Apr 03, 2017 4:22 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
juanamores Master
Joined: 15 Mar 2015 Posts: 317
|
Posted: Mon Apr 03, 2017 6:28 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Sat Apr 08, 2017 9:40 pm Post subject: |
|
|
| Code: |
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
}
}
}
}
}
}
|
|
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Apr 09, 2017 9:15 am Post subject: |
|
|
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 ! |
|
| Back to top |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Sun Apr 09, 2017 11:04 am Post subject: |
|
|
sorry there is a bind statement
bind pub -|- !pre ms:pre |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Apr 09, 2017 11:18 am Post subject: |
|
|
| 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 ! |
|
| Back to top |
|
 |
|