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 

custom flag

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


Joined: 26 Mar 2010
Posts: 22

PostPosted: Thu Sep 30, 2010 3:34 pm    Post subject: custom flag Reply with quote

Hello i want a tcl(i believe it is an easy one).
i want the bot to give auto mode +a on the users that have +A flag.like it gives +v on +g users.(affected by chanset aop-delay).
for example if i have global +A i want the bot when it can to give me +a channel mode on join like the +v with +g flag and +o with +a flag
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Sep 30, 2010 8:11 pm    Post subject: Reply with quote

Code:


bind join - "% *" giveSOP


proc giveSOP {nick uhost handle chan} {

   if {[matchattr $handle A]} {
      putserv "mode $chan +a $nick"
   }
}




This method of auto-awarding +a is not secure, as the bot is watching the users hostmask.
I think that if you want certain users, with certain flags, to be able to get +a, then it would be better for these users to have to identify themselves with a password.

On the one network I tried the above script on, I could not fully test it.
This was because the bot was not the channel owner, and only the channel owner can award +a there.
I could see that the bot did try to award +a though, and was denied.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Sep 30, 2010 8:42 pm    Post subject: Reply with quote

With something like this script below, your users that you set +A, could send a /msg to the bot, using their password, and the bot would award them +a (if the server allows it)


Code:


# Tell the user to send:
# /msg <botnick> #channel <password_here>
# ( User must have +A, else script will not award +a)
#
# Example:
#          /msg AnyBot #chittychat xyz123abc
#


bind msg - "!sop" SOPviamsg



proc SOPviamsg {nick uhost handle text} {
global botnick

   set chan [lindex [split $text] 0]


   if {![botonchan $chan]} {
      putserv "privmsg $nick :$botnick is not on channel $chan"
      return 0
      }


   if {[passwdok $handle [lindex [split $text] 1]] && [matchattr $handle A]} {
      putserv "mode $chan +a $nick"
      } else {
      putserv "privmsg $nick :Syntax: /msg $botnick #channel <password_here> "
      }
}








Again, this could not be fully tested, as the bot was not the channel owner in the test channel I used.
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