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.

public command with nickserv auth check

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
simo
Revered One
Posts: 1079
Joined: Sun Mar 22, 2015 2:41 pm

public command with nickserv auth check

Post by simo »

greetingz,

i had a request to add a auth check if the nick is auth via nickserv and is validated in eggdrop users file
in this code im not sure how to integrate this in a 307 numeric raw check if the nick is identified as on some network like dalnet where we plan to use this users dont have a static IP but rather their IP keeps changing so we cant use the internal auth in eggdrop as that usually uses nick!ident@host

this is what we work with so far:

Code: Select all


bind pub -|- !v pub:voice


proc pub:voice {nick host hand chan text} {

	if {![botisop $chan]} {	puthelp "NOTICE $nick :I'm not oped on $chan." ; return 0 }

  if {![isvoice $nick $chan] && $text == "" && ([matchattr $hand on|on $chan] || [isop $nick $chan] || [ishalfop $nick $chan])} { pushmode $chan +v $nick }


	if {![matchattr $hand o|o $chan] && ![isop $nick $chan] && ![ishalfop $nick $chan]} { return 0 }

	set users [list]
     foreach user [split $text] {
       set user "[string trimleft $user "!~&@"]"
       set user "[string trimright $user ":"]"
		if {![onchan $user $chan]} {
			putserv "NOTICE $nick :$user is not on channel $chan"
		} else {
				if {![isvoice $user $chan] && ![string match -nocase "*$::botnick*" $user]} {  pushmode $chan +v $user }
		}
	}
}


User avatar
CrazyCat
Revered One
Posts: 1236
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: public command with nickserv auth check

Post by CrazyCat »

If the network has the CAP account-notify, you can use getaccount to know if the user is identified or not.
s
simo
Revered One
Posts: 1079
Joined: Sun Mar 22, 2015 2:41 pm

Re: public command with nickserv auth check

Post by simo »

Dalnet doesn't have that afaik
User avatar
CrazyCat
Revered One
Posts: 1236
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: public command with nickserv auth check

Post by CrazyCat »

So, 2 solutions:
1. leave dalnet for a real network (joking, the only real network is french and named zeolia)
2. you have to do a /whois $nick and catch the server response to get the good "is registered" raw. Means to remember nicks in a variable to check if a raw bind matches the nick you're checking
Post Reply