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 

command in .tcl to exclude ops

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


Joined: 26 Jan 2002
Posts: 115
Location: Orlando, Florida

PostPosted: Thu Nov 17, 2005 6:19 pm    Post subject: command in .tcl to exclude ops Reply with quote

I have a .tcl that when someone in the channel private messages the bot, the bot itself says in channel:

"<nick> You were asked not to private message anyone when you entered."

The problem is when someone does it who is an op and they use /msg to op or IDENT or whatever, they receive this warning. I am trying to get the bot to reconize if this person has the +o flag to NOT give the channel message. I was trying:

if {([matchattr $hand o|o $chan])} {
return 0
}

But it's not working. Any suggestions?
Thanks!
_________________
www.irc-orlando.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Nov 17, 2005 6:34 pm    Post subject: Reply with quote

There's no chan attribute in a msg or msgm bind.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DrTongue
Op


Joined: 26 Jan 2002
Posts: 115
Location: Orlando, Florida

PostPosted: Thu Nov 17, 2005 6:46 pm    Post subject: Reply with quote

So:

if {([matchattr $hand o|o])} {
return 0
}

???

And would $nick or nick be what I should use instead of $hand?
_________________
www.irc-orlando.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Nov 17, 2005 6:51 pm    Post subject: Reply with quote

No that's incorrect, show us your code so we could help you.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DrTongue
Op


Joined: 26 Jan 2002
Posts: 115
Location: Orlando, Florida

PostPosted: Thu Nov 17, 2005 7:08 pm    Post subject: Reply with quote

Ok sorry....here is the script itself that makes the bot respond with a message in the channel:

bind msgm - "*" proc:laina
#seting respondiendo el Privado
set chan "#channel"
proc proc:laina {nick uhost hand arg} {
global chan
set line [string trim $arg]
if {$nick == "SeenServ"} {
puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
return 0
}

puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."

}
return 0
_________________
www.irc-orlando.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Nov 18, 2005 8:39 am    Post subject: Reply with quote

Code:
bind msgm - "*" proc:laina
#seting respondiendo el Privado
set chan "#channel"
proc proc:laina {nick uhost hand arg} {
 global chan
 set line [string trim $arg]
 if {$nick == "SeenServ"} {
  puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
  return 0
 }
 if {[matchattr $hand o|o $chan]} { return 0 }
 puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DrTongue
Op


Joined: 26 Jan 2002
Posts: 115
Location: Orlando, Florida

PostPosted: Fri Nov 18, 2005 5:29 pm    Post subject: Reply with quote

Thank you Sir! Works like a charm! Very Happy
_________________
www.irc-orlando.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
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