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.
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Tue Jun 28, 2005 9:29 pm
I'm trying to modify an auto-response tcl to not reply when an OP is logging in via PM. What would this look like?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 9:38 pm
what the code you are trying to modify looks like?
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Tue Jun 28, 2005 9:40 pm
Code: Select all
bind msgm - "*" proc:laina
#seting responding to the private message
set chan "#Channels"
proc proc:laina {nick uhost hand arg} {
global chan
set line [string trim $arg]
if {$nick == "SeenServ"} {
puthelp "privmsg $nick :I am sorry, I am a bot."
return 0
}
puthelp "PRIVMSG $nick :I am an automated Bot."
puthelp "PRIVMSG $nick :Please ask your question in the main channel."
}
return 0
putlog "Private loaded"
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 9:50 pm
judging by the meaning of that proc's name, I'd assume the rest is as idiotic as the code you pasted, but anyway:
insert this as first line of that proc:
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Tue Jun 28, 2005 9:59 pm
Well, I didn't write it.. in fact I got it from the TCL Archive here.
Pardon my naitivity, but where exactly should I put that? And are those [ and not { ?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 10:03 pm
your eyes don't deceive you, those are brackets, not braces
but you can use additional braces around the brackets if you wish
you put that right below the line that says "proc proc:[censored] etc."
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Tue Jun 28, 2005 10:18 pm
that didn't work - it quit sending any auto-responses. is there anything else that might work?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 11:12 pm
if you did as you were told to, and it keeps msg'ing you, that means some other proc is involved
I'd recommend against using that script, whatever it's supposed to do - as I said, it's simply idiotic
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Tue Jun 28, 2005 11:18 pm
Ok - then do you know of one that can accomplish what I need? I need it to auto-repond a message to anyone that PMs the Eggdrop, but not when someone is logging in via the Bot, ie op <pass>
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 11:47 pm
Code: Select all
bind msgm - * foo
proc foo {n u h t} {
if ![matchattr $h o|o] {
puthelp "notice $n :I am a bot. Your message was ignored."
}
}
tbonekkt
Voice
Posts: 11 Joined: Tue Jun 28, 2005 9:26 pm
Post
by tbonekkt » Wed Jun 29, 2005 8:30 pm
Is there anything I need to customize for this to work? I realize I can change the message, but anything besides that?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jun 29, 2005 8:42 pm
What's there to customize, just load the code and your bot should do what you wanted.