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 

Check User is protect and is owner (+a & +q)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
MrDeNNiS
Voice


Joined: 07 Jan 2012
Posts: 3

PostPosted: Mon Feb 06, 2012 10:05 am    Post subject: Check User is protect and is owner (+a & +q) Reply with quote

Hello,

I have simple code like this.

Code:
bind pub - !op op:proc
proc op:proc {nick uhost hand chan arg} {
if {[isop $nick $chan]} {

#my code goes here, it works problem is not here.

}
}


The problem is that if the user have a "op" (+o) , works great. But if the user have a "protect" (+a) or "owner" (+q) code doesn't work.
Please help me, how can I make this code working for "protected users and channel owners." ?
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Mon Feb 06, 2012 10:42 am    Post subject: Reply with quote

One thing that comes to mind, to check:

In eggdrop.conf, find:
set opchars

What is it now? Is it:
set opchars "@"
If I recall correctly, that is the default.
If so, change it to include & and ~
and .restart

reference:
http://eggwiki.org/Eggdrop.conf
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Feb 06, 2012 7:08 pm    Post subject: Re: Check User is protect and is owner (+a & +q) Reply with quote

MrDeNNiS wrote:
The problem is that if the user have a "op" (+o) , works great. But if the user have a "protect" (+a) or "owner" (+q) code doesn't work.
Please help me, how can I make this code working for "protected users and channel owners." ?


Thommey wrote something for this already...
Quote:
Arbitrary chanmodes (+q, +a)

This script provides accessor functions isowner and isadmin to get ownership/adminship (or w/e those are) to tcl scripts.
You need to restart the bot when you first load it.


See here --> http://thommey.tclhelp.net/?page=scripts

Download here --> http://thommey.tclhelp.net/dl/dl.htcl?id=6
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
FightingNavyman
Voice


Joined: 18 Jan 2011
Posts: 35

PostPosted: Fri Mar 02, 2012 4:20 pm    Post subject: Reply with quote

how do yo use it?
Back to top
View user's profile Send private message
Regex
Voice


Joined: 19 Mar 2011
Posts: 19

PostPosted: Sat Mar 03, 2012 2:44 pm    Post subject: Reply with quote

Code:

bind mode - * mode:msg
proc mode:msg {nick uhost hand chan mode desc} {
  global botnick
  if {$mode == "+o"} {
    if {$desc == $botnick} { return 0 }
    putquick "PRIVMSG $chan $desc $desc is now an operator!"
  }
  if {$mode == "+h"} {
    if {$desc == $botnick} { return 0 }
    putquick "PRIVMSG $chan $desc $desc is now halfoperator!"
  }
  if {$mode == "+v"} {
    if {$desc == $botnick} { return 0 }
    putquick "PRIVMSG $chan $desc $desc is now voice!"
  }
  if {$mode == "+a"} {
    if {$desc == $botnick} { return 0 }
    putquick "PRIVMSG $chan $desc $desc is now super operator!"
  }
  if {$mode == "+q"} {
    if {$desc == $botnick} { return 0 }
    putquick "PRIVMSG $chan $desc $desc is now founder!"
  }
}


I added +q and +a modes but bot giving 2 message to channel. how can we prevent this?
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 -> Script Requests 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