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.
Help for those learning Tcl or writing their own scripts.
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Tue May 15, 2007 11:01 pm
Thanks Sir,Fz i'll try it and then i'll let ya know
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sat May 19, 2007 6:08 pm
Thank you for your help Sir_Fz, it worked great.
I have a one last question please. The following codes works sometime and sometime they don't. Am i missing something?
so user with Z flag types /msg bot inv
Code: Select all
bind msg Z inv msg:invite
proc msg:invite {nick host hand text} {
if {![onchan $nick #name]} {
putserv "INVITE $nick #name"
} else {
puthelp "NOTICE $nick :you are already in"
}
}
thanks
YooHoo
Owner
Posts: 939 Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast
Post
by YooHoo » Sun May 20, 2007 12:20 am
maybe if you include a matchattr check inside your procedure it would be better
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sun May 20, 2007 12:33 am
now they don't work at all
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sun May 20, 2007 2:37 am
My guess would be that hostmasks for one or several users are not properly set up, causing users not to be recognized, or recognized as someone else...
In this case, the solution (obviously) would be to correct hostmasks of those users. The .channel dcc-command might be useful to actually see whom your eggdrop identifies the user as
NML_375
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sun May 20, 2007 2:39 pm
thank you nml375;
I've created invite handle and added 4,5 ip/hosts to it to test it. they all are added like *!*ident@ip and their idents are different.
When channel is invite only then they cann't get in so i cann't use .channel command to see.. so these codes are correct?
Code: Select all
bind msg Z inv msg:invite
proc msg:invite {nick host hand text} {
if {![onchan $nick #name]} {
putserv "INVITE $nick #name"
} else {
puthelp "NOTICE $nick :you are already in"
}
}
thanks
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sun May 20, 2007 2:44 pm
You could always remove the Z from the binding, and add something like this in the beginning of your proc:
Code: Select all
if {![matchattr $hand +Z]} {
putlog "Inviter: Failed invite by $nick!$host ($hand), no permissions"
return 0
}
Should dump a logmessage if the user does not have permissions, including the handle (s)he was identified as...
edit: And yes, your code is otherwize proper... and, just to make sure, by saying remove Z, you should replace it with a -
NML_375
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sun May 20, 2007 3:46 pm
thank you again nml375, i'll give it a try