| View previous topic :: View next topic |
| Author |
Message |
PlayTecH Voice
Joined: 17 Nov 2006 Posts: 1 Location: indonesia
|
Posted: Fri Nov 17, 2006 12:55 pm Post subject: find nick access |
|
|
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 }
}
} |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Fri Nov 17, 2006 1:55 pm Post subject: |
|
|
| This forum is for TCL, not mirc scripting. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Nov 17, 2006 2:19 pm Post subject: |
|
|
| 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..) |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Nov 17, 2006 3:55 pm Post subject: |
|
|
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
| Code: | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
K3rN3L_P4nIC Voice

Joined: 17 Nov 2006 Posts: 6
|
Posted: Fri Nov 17, 2006 11:18 pm Post subject: |
|
|
| I need a similar script but kickban any nicks if not equal a access aop/sop nick |
|
| Back to top |
|
 |
|