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.

find nick access

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
P
PlayTecH
Voice
Posts: 1
Joined: Fri Nov 17, 2006 12:17 pm
Location: indonesia

find nick access

Post by PlayTecH »

Hi, I made a little script that find nick access when they (ops ) join to channel, then chanserv sets mode +o . I want to use it on my eggdrop. Can you help me please.

on 1:op:#hackmasters:if ($opnick != $me) && ($nick == ChanServ) /chanserv why #hackmasters $opnick
on *:NOTICE:*:*:{ {
if $nick == chanserv {
if (AOp isin $1-) { msg #hackmasters welcome $1 , How Are you $12 ? }
if (SOp isin $1-) { msg #hackmasters welcome $1 , How Are you $12 ? }
if (FOUNDER isin $1-) { msg #hackmasters Welcome Master | /msg #hackmasters $1 is Founder #HackMasters }
}
}
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

This forum is for TCL, not mirc scripting.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Take a look at the "Flag On Join" script or search the tcl archive for "mode change" (keep in mind, eggdrop does not support all of the newer channel/user modes, so you'd have to make a script work on "raw" msgs from the server..)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Rough piece of code to get started with, probably a few flaws in there tho..
The regular expression is based on an example from dal.net, as I did'nt find any documentation on the exact response from Chanserv

(I guess it would be possible to just split the text and use lindex to extract the various bits of information to make it abit more fault-tolerant, tho using regular expressions makes it easier to ditch "non-why" notices from chanserv).

Oh, and since I don't use dalnet or services such as Chanserv, code is untested :P

Code: Select all

bind mode - "#hackmasters +o" hackmaster:checkop
bind notc - "*" hackmaster:checkwhy

proc hackmaster:checkop {nick host hand chan mode target} {
 if {[string compare -nocase $::botnick $target] == 0} {return}
 if {[string compare -nocase "ChanServ" $nick] != 0} {return}
 putserv "CHANSERV WHY $chan $target"
}

proc hackmaster:checkwhy {nick host hand text dest} {
 if {[string compare -nocase $::botnick $dest] !=0]} {return}
 if {[string compare -nocase "ChanServ" $nick] !=0} {return}
 if {[regexp {(.+) has (SOp|AOp|Founder) access to (.+)\. Reason: Identification to the nickname (.*)} $text match checknick checkaccess checkchan checkuser] != 1} {return}
 switch -- $checkaccess {
  "AOp" -
  "SOp" {
   puthelp "PRIVMSG $checkchan :Welcome ${checknick}, How are you ${checkuser}?
  }
  "Founder" {
   puthelp "PRIVMSG $checkchan :Welcome Master"
   puthelp "PRIVMSG $checkchan :$checknick is Founder $checkchan"
  }
  default {}
}
NML_375
User avatar
K3rN3L_P4nIC
Voice
Posts: 6
Joined: Fri Nov 17, 2006 11:08 pm

Post by K3rN3L_P4nIC »

I need a similar script but kickban any nicks if not equal a access aop/sop nick
Post Reply