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 

help issue [SOLVED]

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


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sat Jul 28, 2007 5:06 am    Post subject: help issue [SOLVED] Reply with quote

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
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 28, 2007 7:20 am    Post subject: Reply with quote

What's higher than having op in a channel?
_________________
Follow me on GitHub

- Opposing

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


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat Jul 28, 2007 8:46 am    Post subject: Reply with quote

look at "set opchars" in your bot's conf file
you probably want
Code:
set opchars "@&~"
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jul 28, 2007 10:06 am    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 28, 2007 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat Jul 28, 2007 10:38 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jul 28, 2007 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 28, 2007 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sat Jul 28, 2007 5:42 pm    Post subject: Reply with quote

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 Smile

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 Sad

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

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Sun Jul 29, 2007 5:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
TRaSH
Halfop


Joined: 26 Feb 2003
Posts: 56
Location: #Anime-Supreme

PostPosted: Sun Jul 29, 2007 7:13 am    Post subject: Reply with quote

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


that isn't a default option in the main bot config is it ?
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sun Jul 29, 2007 9:30 am    Post subject: Reply with quote

TRaSH wrote:
DragnLord wrote:
look at "set opchars" in your bot's conf file
you probably want
Code:
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.
Back to top
View user's profile Send private message
TRaSH
Halfop


Joined: 26 Feb 2003
Posts: 56
Location: #Anime-Supreme

PostPosted: Sun Jul 29, 2007 9:33 am    Post subject: Reply with quote

bah,
thnx
i edited my conf and removed allot of lines and never found it when doing a search.
thnx again
Back to top
View user's profile Send private message
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Tue Jul 31, 2007 11:13 am    Post subject: Reply with quote

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 Smile
i'm a little n00b still Smile
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
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