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.
Old posts that have not been replied to for several years.
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sat Aug 07, 2004 11:09 pm
hi, how can i let the bot say something to the channel when a user talks after he was a specific amount of time idling? lets say 10 hrs?
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sat Aug 07, 2004 11:20 pm
check 'getchanidle' (returns the number of minutes they've been idle) every time someone says something.
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 6:37 am
i tried numerous scripts but all they do is do something after someone reached a specific amount of idle.
i need a script that says something into the channel when a user says something after he was a specific amount of time idleing in the channel.
difoo
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 8:00 am
Your initial post suggested you were going to code it yourself...why didn't you say you want somebody to do the job for you in the first place? Enjoy wasting people's time?
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 8:33 am
im sorry i didnt just ask in the first place. and yes i need someone to help me doing this. the idle scripts that are available dont do what i would want.
difoo
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 8:57 am
Code: Select all
bind pubm - * checkIdle
proc checkIdle {n u h c a} {
# 600 minutes == 10 hours...
if {[getchanidle $n $c]>600} {
puthelp "PRIVMSG $c :Welcome back $n!"
}
}
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 9:24 am
user wrote: Code: Select all
bind pubm - * checkIdle
proc checkIdle {n u h c a} {
# 600 minutes == 10 hours...
if {[getchanidle $n $c]>600} {
puthelp "PRIVMSG $c :Welcome back $n!"
}
}
am i correct that the pubm is for pubm(essage) ?
also can you explain proc checkIdle {n u h c a} { ?
I read nick uhost h=hour? chan args
-difoo
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 9:30 am
difoo wrote: am i correct that the pubm is for pubm(essage) ?
and kool, it works
yes...and you can include a channel name in the mask if you want to limit it to a particular channel and a flag to only let it be triggered by certain people...eg:
Code: Select all
bind pubm o|o "#yourchan *" checkIdle
would only be triggered by +o users in #yourchan (+o the flag, not the channel mode)
Remember to .restart or unbind the old bind manually if you change it.
the 'h' is 'handle'; {nick uhost handle channel argument}
Last edited by
user on Sun Aug 08, 2004 9:34 am, edited 1 time in total.
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 9:33 am
i understand. yes i know of o|o. if im right o|o stands for o in chan & global. next time i really should read the tcl-commands.tcl. thanks user.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 9:35 am
difoo wrote: i understand. yes i know of o|o. if im right o|o stands for o in chan & global. next time i really should read the tcl-commands.tcl. thanks user.
| means OR, not AND (&)
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 10:20 am
one last qustion, how would you add 2 other "if" variables to your if statement?
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 10:22 am
difoo wrote: one last qustion, how would you add 2 other "if" variables to your if statement?
What do you mean? You want different messages depending on how long they've been idle?
Code: Select all
if {expression1} {
action 1
} elseif {expression2} {
action 2
};# etc..
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 10:28 am
like this: if {[validuser $hand] && [matchattr $hand o|o $chan]} {
& your if statement. I keep getting extra-character errors
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sun Aug 08, 2004 10:34 am
difoo wrote: & your if statement. I keep getting extra-character errors
"extra characters after close-brace"? you need spaces between words in tcl. Add some spaces and try it again
Have you ever read "The Manual"?
difoo
Voice
Posts: 33 Joined: Sat Jul 03, 2004 9:56 am
Post
by difoo » Sun Aug 08, 2004 10:41 am
got it now
thanks to you
difoo