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.

on join

Help for those learning Tcl or writing their own scripts.
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

Thanks Sir,Fz i'll try it and then i'll let ya know
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

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
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

maybe if you include a matchattr check inside your procedure it would be better
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

now they don't work at all
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

thank you again nml375, i'll give it a try
Post Reply