TCLDROP
Would you like to react to this message? Create an account in a few clicks or log in to continue.
TCLDROP

Eggdrop And TCL Help, Support And Chat
 
HomeHome  PublicationsPublications  FAQFAQ  SearchSearch  MemberlistMemberlist  Latest imagesLatest images  UsergroupsUsergroups  RegisterRegister  Log in  CalendarCalendar  WebsiteWebsite  ChatRoomChatRoom  

 

 Mute Ban

Go down 
AuthorMessage
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

Mute Ban Empty
PostSubject: Mute Ban   Mute Ban Empty21/5/2020, 21:53

A advanced mute script edited by pegasus

Code:
############
# Mute Ban #
############

# Trigger
set mtrig "@"

# Proc to obtain the trigger
proc getmtrig {} {
   global mtrig
   return $mtrig
}

# Define the IRCd type to be used.
# Available options are: unreal (UnrealIRCd), insp (InspIRCd), chary (Charybdis)
# Mute bans (aka quiet bans) are only set in the format nick!*@* or *!*@hostmask
set ircdtype "ircd-type"

bind pub - ${mtrig}muteban muteban

proc muteban {nick uhost hand chan text} {
   global ircdtype botnick

   set target "[lindex [split $text] 0]"

   if {![matchattr [nick2hand $nick] m] || ![isop $nick $chan]} {
      putserv "PRIVMSG $chan :Sorry, $nick, but you don't have access."
      return 0
   }

   if {$target eq ""} {
      putserv "PRIVMSG $chan :ERROR! Syntax: [getmtrig]muteban <nick>"
      return 0
   }

   if {$ircdtype eq "unreal"} {
      if {[onchan $target $chan]} {
         set hostmask "[maskhost [getchanhost $target $chan] 2]"
         pushmode $chan +b "~q:$hostmask"
      } else {
         pushmode $chan +b ${target}!*@*
      }
   } elseif {$ircdtype eq "insp"} {
      if {[onchan $target $chan]} {
         set hostmask "[maskhost [getchanhost $target $chan] 2]"
         pushmode $chan +b "m:$hostmask"
      } else {
         pushmode $chan +b ${target}!*@*
      }
   } elseif {$ircdtype eq "chary"} {
      if {[onchan $target $chan]} {
         set hostmask "[maskhost [getchanhost $target $chan] 2]"
         pushmode $chan +q $hostmask
      } else {
         pushmode $chan +q ${target}!*@*
      }
   }
}
Back to top Go down
http://www.computer-tech1.webnode.co.uk
 
Mute Ban
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TCLDROP :: Other :: Code-
Jump to: