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 

Script for public command !banlist and for # ban

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


Joined: 27 Sep 2008
Posts: 67

PostPosted: Sat Sep 27, 2008 7:40 am    Post subject: Script for public command !banlist and for # ban Reply with quote

Hey guys,can somebody write me tcl which will reacts when I type "!banlist" in some channel,and then he will say all bans in that channel..also public..I tried to edit code that I find in manager.tcl :

Code:
# Usage: !banlist
proc pub:banlist {nick host hand chan arg} {
   global botnick
   putserv PRIVMSG $chan "\002Global bans:\002"
   if {[banlist] == ""} {
      putserv "PRIVMSG $chan :None."
   } else {
      foreach ig [banlist] {
         set what [lindex $ig 0]
         set by [lindex $ig 5]
         set comment [lindex $ig 1]
         putserv "PRIVMSG $chan : "$what - by $by, Reason: $comment"
      }
   }
   putserv "PRIVMSG $chan : Bans for $chan:"
   if {[banlist $chan] == ""} {
      putserv "PRIVMSG $chan :None."
   } else {
      foreach b [banlist $chan] {
         set what [lindex $b 0]
         set by [lindex $b 5]
         set comment [lindex $b 1]
         putserv "PRIVMSG $chan : $what - by #4$by#, Reason: $comment"
      }
   }
   putserv "PRIVMSG $chan : End Of Banlist."
   putcmdlog "<<$nick>> !$hand! banlist $chan"
}


And second tcl..I need script that will ban anyone who writes *#* in channel #bla..And I wanna to add more channels,2 or 3 ,but not all channels bot is on..
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Sep 27, 2008 11:20 am    Post subject: Reply with quote

This should display the channel-bans after requesting !banlist (feel free to modify it).
Code:
bind pub - !banlist proc:banlist

proc proc:banlist {nick uhost hand chan arg} {
 foreach b [chanbans $chan] {
  puthelp "privmsg $chan :[lindex $b 0] by [lindex $b 1]"
 }
}

As for the second request, there are tons of anti-advertising/bad words scripts in the Tcl archive.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DaRkOoO
Halfop


Joined: 27 Sep 2008
Posts: 67

PostPosted: Sat Sep 27, 2008 11:45 am    Post subject: Reply with quote

I tried tons of them, but no one works like i want.They usually works for all chanells and i need it just for few chanells which i can add and remove.

[EDIT] - Okey,I made this from few tcl scripts :

Code:
bind pubm -* "*#*" badchar:pub


# Define the channel where u want the kickbans to work:
set bchan "#botchan"

proc badchar:pub {nick uhost hand chan arg} {
    global bchan
 if {$chan == "#botchan"} {
    if {[botisop $bchan]} {
    putquick "MODE $bchan +b *!*@[lindex [split $uhost @] 1]"
    putserv "KICK $bchan $nick :Bad Character"

    }
       
    }
}


Now..I need to have an option that will protect channel ops (will not kick @'s even if they say # on some channel) ..But I need to can put 1 ( protect @'s) ,and 2 (don't protect ops)..And I wanna to can add more channels..
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