egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Putnow / Putquick

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Apr 03, 2017 11:20 am    Post subject: Putnow / Putquick Reply with quote

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
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 921

PostPosted: Mon Apr 03, 2017 11:41 am    Post subject: Re: Putnow / Putquick Reply with quote

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
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Apr 03, 2017 12:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 921

PostPosted: Mon Apr 03, 2017 12:13 pm    Post subject: Reply with quote

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. Smile
_________________
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
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Apr 03, 2017 12:28 pm    Post subject: Reply with quote

yup....I was editing it Very Happy
Back to top
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 921

PostPosted: Mon Apr 03, 2017 12:47 pm    Post subject: Reply with quote

intel wrote:
yup....I was editing it Very Happy


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
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Apr 03, 2017 12:52 pm    Post subject: Reply with quote

that is the line....
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Mon Apr 03, 2017 2:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Apr 03, 2017 4:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Mon Apr 03, 2017 6:28 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Sat Apr 08, 2017 9:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 921

PostPosted: Sun Apr 09, 2017 9:15 am    Post subject: Reply with quote

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
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Sun Apr 09, 2017 11:04 am    Post subject: Reply with quote

sorry there is a bind statement

bind pub -|- !pre ms:pre
Back to top
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 921

PostPosted: Sun Apr 09, 2017 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber