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.

Convert script to Tcl

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
f
fireblade
Voice
Posts: 11
Joined: Fri May 07, 2010 9:49 am
Location: Ireland

Convert script to Tcl

Post by fireblade »

can anyone please convert this .mrc script if possible to a tcl file to load on eggdrop, tia.

Code: Select all

on @*:text:*:#:{
  if ($nick isreg $chan) {
    var %i = 1
    while (%i <= 9) {
      var %x = $asc($mid($strip($1-),%i,1))
      if ((%x == 9834) || (%x == 9835)) { halt }
      if (%x > 255) {
        ban -u60 # $nick 2
        kick # $nick Go away
        write $qt(scripts\bans.txt) $address($nick,2)
        halt
      }
      inc %i
    }
  }
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I tried with a bit of googling to understand what you want to achieve with this but I'm kind of stuck at what is the while loop supposed to check. You want to punish on usage of codes outside the ASCII table?
Once the game is over, the king and the pawn go back in the same box.
f
fireblade
Voice
Posts: 11
Joined: Fri May 07, 2010 9:49 am
Location: Ireland

Convert script to Tcl

Post by fireblade »

Thanks for reply, this code was written by someone else, but basically it's to catch spambots currently flooding Undernet with various types of text, they have switched from normal type fonts, which the bots can easily deal with to non standard type.

this script works fine, but its for Mirc, which means the person using the script must be connected all the time, so ideally if was was a tcl, it can be loaded on the bots, thanks again
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Can you give me an example of how a flood line looks like so I would know what is expected to trigger on?
Once the game is over, the king and the pawn go back in the same box.
f
fireblade
Voice
Posts: 11
Joined: Fri May 07, 2010 9:49 am
Location: Ireland

RE Convert script to Tcl

Post by fireblade »

This is one of the current lines being used,

<faisch> /!⧹ ATТN: Ꭲһіs cһаnnel haѕ mo⋁ᥱԁ to іrⅽ.frеenഠde․net #/ϳoiᥒ /!\

Thanks
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Basically from what I understood from your mIRC script it takes the only first 9 characters from user's input and tests if the characters transformed in ASCII is above 255, and something I didn't understand with 9834 and 9835.

This code will test all user's input not just first 9 characters for ASCII above 255. Give it a try and let me know if works or not.

Code: Select all

bind pubm * * filter:msg

proc filter:msg {nick uhost hand chan text} {
	if {![botisop $chan]} return
	set text [stripcodes bcru $text]
	foreach char [split $text ""] {
		if {[scan $char %c] > 255} {
			scan $uhost {%*[^@]@%s} host
			pushmode $chan +b "*!*@$host"
			putkick $chan $nick "Go away"
			break
		}
	}
}
I used pushmode and putkick so the bot will queue multiple bans and kicks in the same line. In theory at least. Feel free to edit whatever suits your needs.
Once the game is over, the king and the pawn go back in the same box.
f
fireblade
Voice
Posts: 11
Joined: Fri May 07, 2010 9:49 am
Location: Ireland

Post by fireblade »

Thanks for the script, unfortunately it's kicking innocent users at the moment, here is an example, AlohaPink was kicked by Saoirse (Go away)
@AlohaPink = 139,865 songs & 964 movies -( List auto updated 2018.Oct.31 at 12am. )- YOU Serve = I Serve -( Open send slots: 3 of 3 )- -( High Speed Fax Modem connect -> fastest send speed to date: 720 kb/s to KizerSoze )- -( Happy Leeching @Õ¿Õ@ )-

I have another tcl which is working perfect on eggdrop 1.8.3 bots, but will not load on eggdrop below this version, I can include the script here if it helps,

Thanks
f
fireblade
Voice
Posts: 11
Joined: Fri May 07, 2010 9:49 am
Location: Ireland

Convert script to Tcl

Post by fireblade »

I think the issue is the current script I'm using will not work on 1.6 eggdrops, so I'm just going to load it on the newer versions, (where it works fine) please consider this topic closed, Thanks again.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The code I gave you is in a "rough" state and can be "polished" here and there, but no problem if you don't want to continue with this. :)
Once the game is over, the king and the pawn go back in the same box.
Post Reply