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 

Convert script to Tcl

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


Joined: 07 May 2010
Posts: 11
Location: Ireland

PostPosted: Mon Oct 29, 2018 4:20 pm    Post subject: Convert script to Tcl Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3504
Location: Area 51

PostPosted: Tue Oct 30, 2018 2:28 am    Post subject: Reply with quote

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?
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
fireblade
Voice


Joined: 07 May 2010
Posts: 11
Location: Ireland

PostPosted: Tue Oct 30, 2018 9:20 am    Post subject: Convert script to Tcl Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3504
Location: Area 51

PostPosted: Tue Oct 30, 2018 10:17 am    Post subject: Reply with quote

Can you give me an example of how a flood line looks like so I would know what is expected to trigger on?
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
fireblade
Voice


Joined: 07 May 2010
Posts: 11
Location: Ireland

PostPosted: Tue Oct 30, 2018 11:45 am    Post subject: RE Convert script to Tcl Reply with quote

This is one of the current lines being used,

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

Thanks
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3504
Location: Area 51

PostPosted: Wed Oct 31, 2018 2:17 am    Post subject: Reply with quote

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.
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
fireblade
Voice


Joined: 07 May 2010
Posts: 11
Location: Ireland

PostPosted: Wed Oct 31, 2018 10:05 am    Post subject: Reply with quote

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
View user's profile Send private message
fireblade
Voice


Joined: 07 May 2010
Posts: 11
Location: Ireland

PostPosted: Thu Nov 01, 2018 4:19 am    Post subject: Convert script to Tcl Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3504
Location: Area 51

PostPosted: Thu Nov 01, 2018 6:12 am    Post subject: Reply with quote

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. Smile
_________________
You may say anything about me, but at least don't misspell my name. xD
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