egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!kick, !op, !deop etc.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Icy
Voice


Joined: 17 Apr 2006
Posts: 1

PostPosted: Mon Apr 17, 2006 11:31 am    Post subject: !kick, !op, !deop etc. Reply with quote

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 Razz

Thank's for your help!
Back to top
View user's profile Send private message
CuteBangla
Halfop


Joined: 27 Feb 2006
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Mon Apr 17, 2006 11:57 am    Post subject: Re: !kick, !op, !deop etc. Reply with quote

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 Razz

Thank's for your help!

_________________
SuMiT
iRC.CuteBangla.Com
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 17, 2006 12:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Apr 17, 2006 8:52 pm    Post subject: Re: !kick, !op, !deop etc. Reply with quote

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
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Mon Apr 17, 2006 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Apr 17, 2006 11:27 pm    Post subject: Reply with quote

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". Smile
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Mon Apr 17, 2006 11:38 pm    Post subject: Reply with quote

Alchera wrote:
Thankfully Sir_Fz came to the "rescue". Smile


Indeed Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber