| View previous topic :: View next topic |
| Author |
Message |
Icy Voice
Joined: 17 Apr 2006 Posts: 1
|
Posted: Mon Apr 17, 2006 11:31 am Post subject: !kick, !op, !deop etc. |
|
|
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
Thank's for your help! |
|
| Back to top |
|
 |
CuteBangla Halfop
Joined: 27 Feb 2006 Posts: 58 Location: Dhaka, Bangladesh
|
Posted: Mon Apr 17, 2006 11:57 am Post subject: Re: !kick, !op, !deop etc. |
|
|
mayb somthing like this
| Code: | 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
Thank's for your help! |
_________________ SuMiT
iRC.CuteBangla.Com |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Apr 17, 2006 12:09 pm Post subject: |
|
|
Example:
| Code: | bind pub - !op opifop
proc opifop {nick uhost hand chan arg} {
if {[isop $nick $chan] && $arg != ""} {
pushmode $chan +o [lindex [split $arg] 0]
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Apr 17, 2006 8:52 pm Post subject: Re: !kick, !op, !deop etc. |
|
|
| CuteBangla wrote: | mayb somthing like this
| Code: | 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 ** _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Last edited by Alchera on Mon Apr 17, 2006 11:21 pm; edited 2 times in total |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon Apr 17, 2006 9:45 pm Post subject: |
|
|
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: |
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. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Apr 17, 2006 11:27 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon Apr 17, 2006 11:38 pm Post subject: |
|
|
| Alchera wrote: | Thankfully Sir_Fz came to the "rescue".  |
Indeed  |
|
| Back to top |
|
 |
|