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.

Private Message "Message"

Old posts that have not been replied to for several years.
Locked
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Private Message "Message"

Post by tbonekkt »

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?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

what the code you are trying to modify looks like?
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Post by tbonekkt »

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"
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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:

Code: Select all

if [matchattr $hand o|o] return
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Post by tbonekkt »

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 { ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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."
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Post by tbonekkt »

that didn't work - it quit sending any auto-responses. is there anything else that might work?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Post by tbonekkt »

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>
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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."
   }
}
t
tbonekkt
Voice
Posts: 11
Joined: Tue Jun 28, 2005 9:26 pm

Post by tbonekkt »

Is there anything I need to customize for this to work? I realize I can change the message, but anything besides that?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What's there to customize, just load the code and your bot should do what you wanted.
Locked