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.

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

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
M
MrDeNNiS
Voice
Posts: 3
Joined: Sat Jan 07, 2012 9:56 am

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

Post by MrDeNNiS »

Hello,

I have simple code like this.

Code: Select all

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." ?
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

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
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

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

Post by speechles »

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...
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
F
FightingNavyman
Voice
Posts: 35
Joined: Tue Jan 18, 2011 12:39 pm

Post by FightingNavyman »

how do yo use it?
R
Regex
Voice
Posts: 19
Joined: Sat Mar 19, 2011 1:23 pm

Post by Regex »

Code: Select all

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?
Post Reply