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.

!kick, !op, !deop etc.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
I
Icy
Voice
Posts: 1
Joined: Mon Apr 17, 2006 11:25 am

!kick, !op, !deop etc.

Post by Icy »

Hello,

I've got an question I can't find anywhere an script that the bot ops someone if someone is opped on the channel does: !op thatnick.

I don't want to change userflags in the bot for this. Just when someone is opped in the channel he can use: !op, !kick etc.

Can someone do this for me or just give me a hint :P

Thank's for your help!
C
CuteBangla
Halfop
Posts: 58
Joined: Mon Feb 27, 2006 10:47 pm
Location: Dhaka, Bangladesh
Contact:

Re: !kick, !op, !deop etc.

Post by CuteBangla »

mayb somthing like this

Code: Select all

bind pub o !op op

proc op {m h d mo y} { 
  if {![botisop $chan] } {
         pushmode $chan +o $n 
      } 
   } 

Icy wrote:Hello,

I've got an question I can't find anywhere an script that the bot ops someone if someone is opped on the channel does: !op thatnick.

I don't want to change userflags in the bot for this. Just when someone is opped in the channel he can use: !op, !kick etc.

Can someone do this for me or just give me a hint :P

Thank's for your help!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Example:

Code: Select all

bind pub - !op opifop

proc opifop {nick uhost hand chan arg} {
 if {[isop $nick $chan] && $arg != ""} {
  pushmode $chan +o [lindex [split $arg] 0]
 }
}
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: !kick, !op, !deop etc.

Post by Alchera »

CuteBangla wrote:mayb somthing like this

Code: Select all

bind pub o !op op

proc op {m h d mo y} { 
  if {![botisop $chan] } {
         pushmode $chan +o $n 
      } 
   } 
month, hour, day, month, year?

If you're going to copy stuff and use it to advise unsuspecting users then get it right!

** Edited **
Last edited by Alchera on Mon Apr 17, 2006 11:21 pm, edited 2 times in total.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Technically it doesn't matter what you call the variables.
"m" would be the nick
"h" would be the uhost
"d" would be handle
"mo" would be channel
"y" would be text (or args)

Granted it gets extremely confusing doing that, but it is possible, the corrected proc would be:

Code: Select all

proc op {m h d mo y} {
  if {![botisop $mo] } {
         pushmode $mo +o $m
      }
   }
Although I'm quite sure that if he wants help from here, those here willing to help would prefer that he use "conventional" variables.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Convention dictates: nick uhost hand chan arg or n u h c a.

The point being made is that the user has no apparent knowledge of Tcl and literally cobbled together totally disparate pieces of code.

Thankfully Sir_Fz came to the "rescue". :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Alchera wrote:Thankfully Sir_Fz came to the "rescue". :)
Indeed :lol:
Post Reply