a simple tcl script

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

a simple tcl script

Postby Fedtmule » Mon Jun 09, 2008 6:32 pm

hello again.

I have a Eggdrop running on my channel and whan some command.

!qop <nickname> - Give him 9999 level ~
!aop <nickname> give him level 10 &
!sop <nickname> give him level 5 @
!op <nickname> give him level 4 %
!voice <nickname> give him level 3 +

can it be do
Fedtmule
 

Re: a simple tcl script

Postby Dandy » Mon Jun 09, 2008 6:42 pm

First of all, eggdrop doesn't use that kind of levels. Second i don't even know if eggdrop supports ~&%
Dandy
 

Re: a simple tcl script

Postby Fedtmule » Mon Jun 09, 2008 7:10 pm

Dandy wrote:First of all, eggdrop doesn't use that kind of levels. Second i don't even know if eggdrop supports ~&%

but !op <nickname> does and why not other levels
Fedtmule
 

Re: a simple tcl script

Postby Fedtmule » Mon Jun 09, 2008 7:21 pm

Fedtmule wrote:
Dandy wrote:First of all, eggdrop doesn't use that kind of levels. Second i don't even know if eggdrop supports ~&%

but !op <nickname> does and why not other levels


/mode #channel +q $nick gives level ~
/mode #channel +ao $nick gives level &
/mode #channel +o $nick gives level @
/mode #channel +h $nick gives level %
/mode #channel +v $nick gives level +
Fedtmule
 

Re: a simple tcl script

Postby Cristian » Tue Jun 10, 2008 2:29 pm

Just to be sure.

Where do you wish to use the script? (what network or IRCd)
What should it do exactly? (Give channel status or eggdrop user level)
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: a simple tcl script

Postby Fedtmule » Wed Jun 11, 2008 6:57 am

Sumsar wrote:Just to be sure.

Where do you wish to use the script? (what network or IRCd)
What should it do exactly? (Give channel status or eggdrop user level)


IRC server irc.p2p-network.net
Fedtmule
 

Re: a simple tcl script

Postby Cristian » Fri Jun 13, 2008 4:05 pm

I'm not sure that eggdrops support owners,admins(userflags) I have to check that out, but its possible to give channelstatus.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: a simple tcl script

Postby Cristian » Sun Jun 15, 2008 12:24 pm

Commands:
    !qop <nickname> - gives channelstatus ~ (owner)
    !aop <nickname> - gives channelstatus & (admin)
    !op <nickname> - gives channelstatus @ (op)
    !hop <nickname> - gives channelstatus % (halfop)
    !voice <nickname> - gives channelstatus + (voice)

Change:
    Channel - (Default: *)
    Trigger - if you want to (Default: \!)
    Flags - if others are needed. (Default: m|m)

Code: Select all
namespace eval public {

   namespace eval variable {
      variable channel "*"
      variable trigger "\!"
      variable flags "m|m"
   }

   bind PUBM $::public::variable::flags "$::public::variable::channel $::public::variable::trigger*" [namespace current]::public

   proc public {nickname hostname handle channel arg} {
      set s "[string trimleft "[lindex [split $arg] 0]" "$::public::variable::trigger"]"
      switch $s {
         qop {
            set victim "[lindex [split $arg] 1]"
            if {[onchan $victim $channel]} {
               putserv "MODE $channel +q $victim"
               putserv "PRIVMSG $channel : Giving channelstatus (+q) to $victim"
            }
         }
         aop {
            set victim "[lindex [split $arg] 1]"
            if {[onchan $victim $channel]} {
               putserv "MODE $channel +a $victim"
               putserv "PRIVMSG $channel : Giving channelstatus (+a) to $victim"
            }
         }
         op {
            set victim "[lindex [split $arg] 1]"
            if {[onchan $victim $channel]} {
               putserv "MODE $channel +o $victim"
               putserv "PRIVMSG $channel : Giving channelstatus (+o) to $victim"
            }
         }
         hop {
            set victim "[lindex [split $arg] 1]"
            if {[onchan $victim $channel]} {
               putserv "MODE $channel +h $victim"
               putserv "PRIVMSG $channel : Giving channelstatus (+h) to $victim"
            }
         }
         voice {
            set victim "[lindex [split $arg] 1]"
            if {[onchan $victim $channel]} {
               putserv "MODE $channel +v $victim"
               putserv "PRIVMSG $channel : Giving channelstatus (+v) to $victim"
            }
         }
      }
   }
}


Enjoy
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar


Return to TCL Scripting Request

Who is online

Users browsing this forum: No registered users and 2 guests

cron