| View previous topic :: View next topic |
| Author |
Message |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sat Jul 28, 2007 5:06 am Post subject: help issue [SOLVED] |
|
|
How can i get this to post the staff highter then @ ? it's only showing the @ staff ?
| Code: | 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" |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze
Last edited by Fire-Fox on Thu Sep 20, 2007 11:11 am; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sat Jul 28, 2007 8:46 am Post subject: |
|
|
look at "set opchars" in your bot's conf file
you probably want
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jul 28, 2007 10:06 am Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Jul 28, 2007 10:26 am Post subject: |
|
|
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 _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sat Jul 28, 2007 10:38 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jul 28, 2007 10:42 am Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Jul 28, 2007 12:28 pm Post subject: |
|
|
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. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sat Jul 28, 2007 5:42 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Sun Jul 29, 2007 5:03 am Post subject: |
|
|
An easier way would be without using isop. Simple and efficient:
| Quote: |
- 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.
================================== |
|
| Back to top |
|
 |
TRaSH Halfop
Joined: 26 Feb 2003 Posts: 56 Location: #Anime-Supreme
|
Posted: Sun Jul 29, 2007 7:13 am Post subject: |
|
|
| DragnLord wrote: | look at "set opchars" in your bot's conf file
you probably want
|
that isn't a default option in the main bot config is it ? |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sun Jul 29, 2007 9:30 am Post subject: |
|
|
| TRaSH wrote: | | DragnLord wrote: | look at "set opchars" in your bot's conf file
you probably want
|
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. |
|
| Back to top |
|
 |
TRaSH Halfop
Joined: 26 Feb 2003 Posts: 56 Location: #Anime-Supreme
|
Posted: Sun Jul 29, 2007 9:33 am Post subject: |
|
|
bah,
thnx
i edited my conf and removed allot of lines and never found it when doing a search.
thnx again |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Tue Jul 31, 2007 11:13 am Post subject: |
|
|
| awyeah wrote: | An easier way would be without using isop. Simple and efficient:
| Quote: |
- 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 |
|
| Back to top |
|
 |
|