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 

public ban command

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


Joined: 22 Mar 2015
Posts: 204

PostPosted: Sat Jun 11, 2016 10:44 am    Post subject: public ban command Reply with quote

greetingz , i was searching for public ban command script couldnt really find any most only ban nick and not host , i was wondering if someone would have one already made
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sat Jun 11, 2016 3:25 pm    Post subject: Re: public ban command Reply with quote

simo wrote:
greetingz , i was searching for public ban command script couldnt really find any most only ban nick and not host , i was wondering if someone would have one already made


This code is created to add ignores to hosts (masks ) of nicks (NOT BAN).
If you replace the newignore comnand by BAN command , it can be useful.

Code:
#Sintax: !ignore [nick | mask] <time in min> <reason>
proc pub:cmdignore {nick uhost handle chan text} {
 if {$text == ""} {return 0}
  if {[regexp -nocase -- {^[-_./\\]+?([a-z0-9]+)[-_./\\]+$} [lindex [split $text] 0] a b]} {
 set target *$b*!*@*
  } else {
  set target [join [lindex [split $text] 0]]
   }
  set b $target
set largo [string length $text]
  set time [join [lindex [split $text] 1]]
  set reason [join [lrange [split $text] 2 [expr { "$largo" - 1}]]]
  if {![string match "*\[0-9\]*" $time]} {set it 15} else { set it "$time"}
 set host [lindex [split [getchanhost $target $chan] @] 1]
 set idents [lindex [split [getchanhost $target $chan] @] 0]
  if {$reason == ""} {set ir "Solicitado por $nick en [join [ctime [unixtime]]]."} else { set ir "$reason Puesto por $nick en [join [ctime [unixtime]]]."}
  if {![string match *!*@* $target] && ![onchan $target]} {
      putserv "PRIVMSG $chan :$target NO se encuentra en el canal!."
      return 0
  }
  if {[onchan $target]} {set im "*!*@[join [lrange [split $host .] 0 end] .]"} else {set im "$target"}
  if {[onchan $target]} {set ident1 "*![join $idents]@*" }
  if {"$idents" == "ircap"} {set ident1 "*![join $idents]@[join $host]"}
     newignore $im $handle "$ir" $it
   newignore $ident1 $handle "$ir" $it
  if {("$it" == 0) && ($reason != "")} { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por siempre, $reason."; return 1 } 
   if {("$it" == 0) && ($reason == "")} { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por siempre."; return 1 }
   if {("$it" == 1) && ($reason != "")} { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por $it minuto, $reason."; return 1}
   if {("$it" == 1) && ($reason == "")} { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por $it minuto."; return 1}
   if {("$it" != 0) && ($reason == "")} { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por $it minutos, $reason."; return 1
   } else { putmsg $chan "$nick, se ha puesto en ignore a $im $b $ident1 por $it minutos; $reason."
   return 1
   }
}


Example with this nick and host: God!genius@I.am.a.god
nick: God
ident: genius
host:I.am.a.god

<God>Hello I came to bother jejeje!
<@operator> !ignore God por molestar
<@MyBoT> operator, se ha puesto en ignore a *!*@I.am.a.god *!genius@I.am.a.god por 15 minutos; molestar.
"por molestar" ( to bother) is a reason to ignore
or just put the nick without reason:
<@operator> !ignore God


Ignoring is put these two forms simultaneously.
*!*@host
*!ident@host

I think if you change:
Quote:
newignore $im $handle "$ir" $it
newignore $ident1 $handle "$ir" $it


like this:
Code:
putserv "mode #chan +b $im $handle $ir $it"
putserv "mode #chan +b $ident1 $handle $ir $it"


The messages are in Spanish , I had not time to translate to English.
With the help of google translator you can see or ask me if you do not understand.
I excepted the idents "ircap" because they are used by many users in my IRC network.
Quote:
if {"$idents" == "ircap"} {set ident1 "*![join $idents]@[join $host]"}


The default time is 15 minutes
Quote:
if {![string match "*\[0-9\]*" $time]} {set it 15} else { set it "$time"}


I have not tested
, but I think you can serve, at least you have an idea of ​​how to take the host or mask for the bans .
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Mon Jun 27, 2016 7:56 pm    Post subject: Reply with quote

If you need to, you can check out some of my releases. There is a public ban script, an ignore script and many other's.
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Tue Jun 28, 2016 9:44 am    Post subject: Reply with quote

thnx get_a_fix
Back to top
View user's profile Send private message
bero93
Voice


Joined: 09 Dec 2014
Posts: 8

PostPosted: Mon Dec 26, 2016 7:02 pm    Post subject: Reply with quote

Get_A_Fix wrote:
If you need to, you can check out some of my releases. There is a public ban script, an ignore script and many other's.


there is a error on line 45 of your ban script
see github
Back to top
View user's profile Send private message AIM Address
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Tue Dec 27, 2016 6:22 am    Post subject: Reply with quote

bero93 wrote:
Get_A_Fix wrote:
If you need to, you can check out some of my releases. There is a public ban script, an ignore script and many other's.


there is a error on line 45 of your ban script
see github


wow.. Thanks, bero93. I hadn't even noticed, everything I added to github has been edited for github, the code I use all binds back to the same trigger so I appreciate you letting me know so I can fix the code. Github needs a bug push notification or something.
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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