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.

A Failed Op Script

Old posts that have not been replied to for several years.
Locked
p
panazonic
Voice
Posts: 11
Joined: Thu Feb 13, 2003 10:50 am
Location: Norway

A Failed Op Script

Post by panazonic »

Does anyone here have/can make a script that msg the user that failed op /msg BOT op PASS to join a spesific channel like this msg: You failed OP. Please join #chan for support
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind msg - op invalid:pass

proc invalid:pass {nick uhost hand arg} {
set pass [lindex [split $arg] 0]
if {![passwdok $hand $pass]} {
 puthelp "NOTICE $nick :INVALID pass, join #chan for support."
 }
}
this will notice the nick to join #chan if the password is not valid.
p
panazonic
Voice
Posts: 11
Joined: Thu Feb 13, 2003 10:50 am
Location: Norway

Post by panazonic »

Thanks! :D
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Sir_Fz wrote:

Code: Select all

bind msg - op invalid:pass

proc invalid:pass {nick uhost hand arg} {
set pass [lindex [split $arg] 0]
if {![passwdok $hand $pass]} {
 puthelp "NOTICE $nick :INVALID pass, join #chan for support."
 }
}
this will notice the nick to join #chan if the password is not valid.
It will also prevent eggdrop from opping a user even when their pass is correct...

Change to:

Code: Select all

unbind msg - op *msg:op
bind msg - op invalid:pass

proc invalid:pass {nick uhost hand arg} {
  set pass [lindex [split $arg] 0]
  if {![passwdok $hand $pass]} {
   puthelp "NOTICE $nick :INVALID pass, join #chan for support."
   return
  }
  *msg:op $nick $uhost $hand $arg
}
note: I'm not sure if *msg:op takes more parameters or not on newer eggdrops (I use 1.1.5 based bots), so you MIGHT need to change it a bit.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

*msg:op works fine on 1.6.13 :)
p
panazonic
Voice
Posts: 11
Joined: Thu Feb 13, 2003 10:50 am
Location: Norway

Post by panazonic »

okey.. But.. I tried to use the code, but it closed...

And.. I'm not so good with tcl scripting (everyone starts one place :P)

so.. can one of you pleeeease send me the tcl or something? :)
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

the "invalid:pass" proc needs to be intergrated
into the password proc ... we need your password proc
I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Dedan wrote:the "invalid:pass" proc needs to be intergrated
into the password proc ... we need your password proc
Um, there is no integrating needed to be done... It is correct as is.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You need to catch unbinds
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

ppslim wrote:You need to catch unbinds
yes, only for the one case, such as this case, where it's already been unbound... ie. .rehash... However, it is not neccessarily true to say that 'you need to catch unbinds' in general, as there are cases where you do not have to.
Locked