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 

!xadd nickname

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Ashoq
Voice


Joined: 17 Jul 2010
Posts: 11

PostPosted: Sun Nov 28, 2010 5:19 pm    Post subject: !xadd nickname Reply with quote

hi again Smile
i have this TCL it works great Smile
i want just add a msg when user have already access on chan

<mybot> User has already access on chan as level $level


Code:
bind pub m !xadd xadd

proc xadd {nick uhost hand chan arg} {

   set who [lindex $arg 0]
        set level "100"

   if {![llength $who]} {puthelp "notice $nick :SYNTAX: !xadd nick "; return}

      puthelp "privmsg X :adduser $chan =$who $level"
      puthelp "privmsg X :modinfo $chan automode =$who op"
      puthelp "privmsg $chan :ADDED $who to $chan with access level $level"
}


10x alot
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Thu Jan 24, 2013 1:50 pm    Post subject: Reply with quote

You can try this version. I didnt test the script but it has no errors in the code. Yet if you encouter some problems you can reply here and ill modify the code and test it.

Code:

bind pub m !xadd x:add
bind notc - * x:notc

proc x:add {nick uhost hand chan arg} {
   global temp

   set temp(chan) $chan
   set temp(user)  [lindex [split $arg] 0]
   set temp(level) [lindex [split $arg] 1]

   if {($temp(user) == "") || ($temp(level) == "")} {putserv "PRIVMSG $chan :4XADD:2 Comanda de folosire este 7» 4!xadd <nick> <nivel> 7«"; return}

   putserv "PRIVMSG X :adduser $chan =$temp(user) $temp(level)"
   utimer 5 [list x:say $chan $temp(user) $temp(level)]
}

proc x:say {chan user level} {
   global temp

   if {![info exists temp(stop)]} {
      putserv "PRIVMSG $chan :4XADD:2 L-am adaugat pe 7» 04$user 7«2 pe canalul 7» 04$chan 7«2 cu access la X de nivel 7» 04$level 7« "
      unset -nocomplain temp(stop)
   }
}

proc x:notc {nick uhost hand arg dest} {
   global temp

   switch -exact -- $nick {
      "X" {
         if {[string match -nocase "*is already added*" $arg]} {
            putserv "PRIVMSG $temp(chan) :\002$temp(user)\002 is already added with X access on \00312$temp(chan)"
            set temp(stop) da
         }
      }
   }
}

_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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