This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Channel Utility TCL

Old posts that have not been replied to for several years.
Locked
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Hi there,

Somebody can help me to build up 'Paste Channel.tcl' I.e. Somebody entered my channel and do whois on me. Then he paste my whois info in the main public channel. So that, the tcl detect that he paste information in the channel. Therefore, he will be kick out for the first time and for the second time he'll get banned.

p/s: paste information isn't limit to whois info, means that tcl can detect that users paste some information that he/she get in irc in the public. I.e. as below;

I paste,
[23:02] *** Joins: caruf (c_est@215-211.sh.cgocable.ca) in #slennox.
Then, my tcl/bot detect it's a paste information, so i'll get kick out.

I paste,
[23:05] *** Quits: Rafael_^ (mala@dl-nas1-sjp-C8B1BA4A.p001.terra.com.br) (perai...) in #slennox. Then, my bot/tcl detect it's a paste information, so i'll get kick out.

etc etc..

Thanks.

Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Many irc client, and even client scripts, have different ways of diaplayin there output. Because of this, it would be extramly hard to do.

Every line of text that the bot receives from irc, would have to be checked, match against a very large list of information, to detects each and every script/client.

This would be rather slow.

In general, just to detect if a user is pasting somthing, would be rather hard. Irc was invented before cut-copy-paste, and there is just plain no code, or information sugesting it has been pasted.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

PPSLIM,

Hehe, I know that, but I wonder how 'darkbot' use in #irc_help Undernet can do that. When someone paste info in the public, the botz will kick that person.

Anyway, if it's difficult to make this tcl scripts, just forget about it. It's some idea for me to increase channel protection newdays. Thanks, ppslim.

Furthermore, can u write a tcl that can kick (first time), ban (second time) with reason and channel specified if some irc users using colors in public.

Thanks.
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

set coloruser {}
bind msgm - "% *" color:kicker
prco color:kicker {nick uh hand chan arg} {
  global coloruser
  if {[regexp -all -- {[1code]
set coloruser {}
bind msgm - "% *" color:kicker
prco color:kicker {nick uh hand chan arg} {
  global coloruser
  if {[regexp -all -- {03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
    if {[set idx [lsearch -exact $coloruser $nick]]} {
      set coloruser [lreplace $coloruser $idx $idx]
      putserv "NOTICE $nick :Banned for colors"
      putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
      putserv "KICK $chan $nick :Banned for colors"
      return
    }
    lappend coloruser $nick
    putserv "NOTICE $nick :Stop usign colors"
    putserv "KICK $chan $nick :Color user"
  }
}
[/code1]03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
    if {[set idx [lsearch -exact $coloruser $nick]]} {
      set coloruser [lreplace $coloruser $idx $idx]
      putserv "NOTICE $nick :Banned for colors"
      putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
      putserv "KICK $chan $nick :Banned for colors"
      return
    }
    lappend coloruser $nick
    putserv "NOTICE $nick :Stop usign colors"
    putserv "KICK $chan $nick :Color user"
  }
}
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

ppslim,

What should I add to this field 'set coloruser {}'. I had changed 'prco' to be proc, then the script doesn't function.
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

EEK

Small bugs in the forum, meant that last post was rather garbled.

And then I forget to post the fix
set coloruser {}
bind msgm - "% *" color:kicker
proc color:kicker {nick uh hand chan arg} {
global coloruser
if {[regexp -all -- {03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
if {[set idx [lsearch -exact $coloruser $nick]]} {
set coloruser [lreplace $coloruser $idx $idx]
putserv "NOTICE $nick :Banned for colors"
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Banned for colors"
return
}
lappend coloruser $nick
putserv "NOTICE $nick :Stop usign colors"
putserv "KICK $chan $nick :Color user"
}
}
There is no need to set anything in the "set coloruser" line, that is there to make the script function corectly.

<font size=-1>[ This Message was edited by: ppslim on 2001-12-09 12:19 ]</font>
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Uwaa, its still doesn't work ppslim. Should i bind msgm to pub?
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OOOPS - yes

well, bind it to pubm.

I here by tender my resignation, as I just don't seem to cut the mustand any more. That and my keyboard is wearing out.
Locked