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 

find nick access

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


Joined: 17 Nov 2006
Posts: 1
Location: indonesia

PostPosted: Fri Nov 17, 2006 12:55 pm    Post subject: find nick access Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Nov 17, 2006 1:55 pm    Post subject: Reply with quote

This forum is for TCL, not mirc scripting.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Nov 17, 2006 2:19 pm    Post subject: Reply with quote

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


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Nov 17, 2006 3:55 pm    Post subject: Reply with quote

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 Razz
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
View user's profile Send private message
K3rN3L_P4nIC
Voice


Joined: 17 Nov 2006
Posts: 6

PostPosted: Fri Nov 17, 2006 11:18 pm    Post subject: Reply with quote

I need a similar script but kickban any nicks if not equal a access aop/sop nick
Back to top
View user's profile Send private message
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