| View previous topic :: View next topic |
| Author |
Message |
fireblade Voice
Joined: 07 May 2010 Posts: 11 Location: Ireland
|
Posted: Mon Oct 29, 2018 4:20 pm Post subject: Convert script to Tcl |
|
|
can anyone please convert this .mrc script if possible to a tcl file to load on eggdrop, tia.
| Code: |
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
}
}
|
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Oct 30, 2018 2:28 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
fireblade Voice
Joined: 07 May 2010 Posts: 11 Location: Ireland
|
Posted: Tue Oct 30, 2018 9:20 am Post subject: Convert script to Tcl |
|
|
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 |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Oct 30, 2018 10:17 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
fireblade Voice
Joined: 07 May 2010 Posts: 11 Location: Ireland
|
Posted: Tue Oct 30, 2018 11:45 am Post subject: RE Convert script to Tcl |
|
|
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 |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Oct 31, 2018 2:17 am Post subject: |
|
|
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: |
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. |
|
| Back to top |
|
 |
fireblade Voice
Joined: 07 May 2010 Posts: 11 Location: Ireland
|
Posted: Wed Oct 31, 2018 10:05 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
fireblade Voice
Joined: 07 May 2010 Posts: 11 Location: Ireland
|
Posted: Thu Nov 01, 2018 4:19 am Post subject: Convert script to Tcl |
|
|
| 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. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Nov 01, 2018 6:12 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|