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.

need a script/info to make a script to get info from ChanSer

Old posts that have not been replied to for several years.
Locked
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

need a script/info to make a script to get info from ChanSer

Post by DallasD »

My server has just update its mIRC. ChanServ now has access list and the like. I would like to get the info to make a script or a script that could to the following:

1) retreave access list and all its info
2) beable to tell if a nick is regestered
3) menipulate the access list

I am sure this can be done but as of yet i have been unable to fine any info on it. I could use any help i can get.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Chanserv access lists can be saved into text files for later use -- string match and regexp can be used to match.

If a nick is in a chanserv access list, it is already registered so there is no need to check for it. However the reply for /nickserv info <nick> can tell if a nick is registered or not.

The bot can manipulate access lists, via pubcmds or privmsgs triggers if you give it the correct access as well.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

thanks for the info. would you happen to know any of the commands and/or ver names the can be used in a script so that a bot can do all of this?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

/chanserv info <#channel>
/chanserv access <#channel> list
/chanserv sop <#channel> list
/chanserv aop <#channel> list

/nickserv info <nick>

/chanserv <aop|sop|akick> <#channel> <add|del|wipe|list>
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

That is great! Thanks for the help.
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

well i do not seem to be smart enough to figure out the script to have my get the access list and put it into a text file. Could anyone give me a hand on how to write this script.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

The following is an example to get the sop/aop list of a channel on DALnet:

Code: Select all

# Name of the storage file for the access list. 
set accesslist "accesslist.txt"

# Full name of channel services.
set chanserv "chanserv@Services.dal.net"

#################
# BIND commands #
#################
bind pub n list access:list
bind notc - "* list for *" write:list
bind notc - "*(*@*)*" write:list
bind notc - "*End of list.*" write:list

proc write:list {nick host hand arg {dest ""}} {
  set msg [ctrl:filter $arg]
  if {([isbotnick $dest]) && ([string equal $nick "ChanServ"])} {
    # Create the storage file for appending.
    set acc_fd [open $::accesslist a]
    puts $acc_fd $msg
    close $acc_fd
  }
}

proc access:list {nick uhost hand chan text} {
  set type [string tolower $text]
  if {[regexp {(sop|aop)} $type]} {
    # Remove old storage file
    if {[file exists $::accesslist]} {file delete $::accesslist}
    putserv "PRIVMSG $::chanserv :$type $chan list"
  } else {
    return
  }
}

# ctrl:filter <string> 
# Strip all control characters. Thanks to ppslim.

proc ctrl:filter {str} { 
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str 
  return $str 
}
Simply type "list aop" or "list sop" in your channel.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

How do you find out what chanserv address or info should be?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

What do you mean by ChanServ address or info?
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

/whois ChanServ
/cs sop #chan list
/cs aop #chan list
The first one will give you Chanserv's "address": ChanServ!user@server.host

** IF you READ that example script I posted you'll see what the address of ChanServ on DALnet is and the "info" returned. Should you give you some idea. :P

As for "info":

Code: Select all

-ChanServ- AOp list for #chan
That is the first line of the message returned by ChanServ when an AOp list is requested (as an example).

Once again, READ ** above!
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

Thanks for the help. But i can see that you do not seem to know what access list i am talking about. I am not talking about Aop and Sop lists. I am talking about the access list that is on the updated IRC servers that use access levels to control everything on a channel. This access list is use insted of Sop and Aop and offers for more control. If anyone knows how to get this list and how to work with it I sure would like to know.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well I know how to get the list you are talking about, but I won't write the script you need (mostly because I don't know your exact ChanServ output)

but generally, you'd bind to NOTICE, issue the ChanServ command, and then parse the output coming from ChanServ (with the only problem being most ChanServs I know won't indicate the end of the output, so you'll probably have to terminate parsing on timer)
D
DallasD
Voice
Posts: 14
Joined: Sat May 14, 2005 10:08 pm

Post by DallasD »

Well it helps that someone seems to know what i am talking about. As for exact ChanServ output, i am not totally sure what you are talking about. But thanks for the info. i will keep trying. If i crash my bot enough maybe i will figure it out.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Are you talking about ChanServ OR NickServ (I just re-read your original post)?

NickServ returns information regarding whether a nick is registered (or not) via the /ns acc <nick> command. A level of 3 indicates an identified nick and level 1 unidentified. As for manipulating the access list of another user, cannot be done unless an IRCOp (I think).
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked