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.

help issue [SOLVED]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

help issue [SOLVED]

Post by Fire-Fox »

How can i get this to post the staff highter then @ ? it's only showing the @ staff ?


Code: Select all

proc help.staff {nick host hand chan arg} { 
  foreach nicks [split [chanlist #chan]] { 
    if {[isop $nicks]} { 
      if {[string tolower $nicks]=="bob" || [string tolower $nicks]=="sitebot" || [string tolower $nicks]=="kidsbits" } {
      # [string match -nocase apache* $nicks]
      } else {
        append o "$nicks "
      }
    }
  }
  putserv "privmsg $chan : Du høre fra en FLS'ser hurtigest muligt 02$nick"
  putserv "privmsg #chan : 02$nick Anmoder om hjælp fra en af staff teamet ::: $o"
Last edited by Fire-Fox on Thu Sep 20, 2007 11:11 am, edited 1 time in total.
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
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 higher than having op in a channel?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

look at "set opchars" in your bot's conf file
you probably want

Code: Select all

set opchars "@&~"
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Although not exactly on the topic of this post, here's some info on the chanlist command:
doc/tcl-commands.doc wrote:chanlist <channel> [flags[&chanflags]]
Description: flags are any global flags; the '&' denotes to look for channel specific flags. Examples:

n - Global Owner
&n - Channel Owner
o&m - Global Op, Channel Master

Returns: list of nicknames currently on the bot's channel that have all of the flags specified;. If no flags are given, all of the nicknames are returned. Please note that if you're executing chanlist after a part or sign bind, the gone user will still be listed, so you can check for wasop, isop, etc.

Module: irc
Now, as it returns a list, there is no need to use split. In fact, using split on the output of this command may produce unexpected results.
Flags would be matched against the first matching handle within the userlist, and does also permit the use of +/- to create more advanced filters (+ being default).
NML_375
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Looking at his code, he's using [isop] and not caring about Eggdrop flags. Fire-Fox, If you want to get the list of people with Eggdrop flags higher than o then go with nml375's suggestion
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Sir_Fz wrote:Looking at his code, he's using [isop] and not caring about Eggdrop flags. Fire-Fox, If you want to get the list of people with Eggdrop flags higher than o then go with nml375's suggestion
What I get from the initial post is that Fire-Fox wants the bot to count channel admins and owners that some ircds support. The only way to do that is to set opchars to "@&~", or whatever symbols the ircd uses, so the bot will recognize them as being operator level and/or higher.

I did not get the impression Fire-Fox was trying to get the list from eggdrop flags.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

In either case, the main emphasis of my post (atleast intended) was to not use split, although perhaps not the main topic of the thread.
NML_375
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

But editing the opchars does not mean that eggdrop will be able to differentiate between the different levels of each char. It only means that [isop] will detect them as op status.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

DragnLord wrote:
Sir_Fz wrote:Looking at his code, he's using [isop] and not caring about Eggdrop flags. Fire-Fox, If you want to get the list of people with Eggdrop flags higher than o then go with nml375's suggestion
What I get from the initial post is that Fire-Fox wants the bot to count channel admins and owners that some ircds support. The only way to do that is to set opchars to "@&~", or whatever symbols the ircd uses, so the bot will recognize them as being operator level and/or higher.

I did not get the impression Fire-Fox was trying to get the list from eggdrop flags.
You are right thats the meaning of the whole thing :)

I did get it to work but not fully, there are 2 owner in the chan that means 2 ~ and we have one with % but it will not show thise two :(

I hope you can help me M8's
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

An easier way would be without using isop. Simple and efficient:
- Do a foreach loop for chanlist users in the channel
- Check string index 0 in every nick for "~", "&", "@" and "%"
- Add that nick to a list

or you can use lsearch also for checking if you dont want to use string index, that would be faster and then lappend the nick to a list.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
T
TRaSH
Halfop
Posts: 56
Joined: Wed Feb 26, 2003 3:38 pm
Location: #Anime-Supreme

Post by TRaSH »

DragnLord wrote:look at "set opchars" in your bot's conf file
you probably want

Code: Select all

set opchars "@&~"
that isn't a default option in the main bot config is it ?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

TRaSH wrote:
DragnLord wrote:look at "set opchars" in your bot's conf file
you probably want

Code: Select all

set opchars "@&~"
that isn't a default option in the main bot config is it ?
Look at the eggdrop.conf included with the bot.
You can easily find that answer on your own.
T
TRaSH
Halfop
Posts: 56
Joined: Wed Feb 26, 2003 3:38 pm
Location: #Anime-Supreme

Post by TRaSH »

bah,
thnx
i edited my conf and removed allot of lines and never found it when doing a search.
thnx again
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

awyeah wrote:An easier way would be without using isop. Simple and efficient:
- Do a foreach loop for chanlist users in the channel
- Check string index 0 in every nick for "~", "&", "@" and "%"
- Add that nick to a list

or you can use lsearch also for checking if you dont want to use string index, that would be faster and then lappend the nick to a list.
And how will you do that i the code i pastet :-)
i'm a little n00b still :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply