| View previous topic :: View next topic |
| Author |
Message |
MaleXachi Voice
Joined: 06 Jul 2011 Posts: 6
|
Posted: Sat Jan 21, 2012 11:14 am Post subject: Convert mIRC Script To TCL Script - Help! |
|
|
I try this piece mirc script that I've made to convert tcl, but I could not really think many have tried.
It has two different idents on which +h and +v is given. If anyone can help me with this .. Thank you! Sorry for my bad english.
This is my mirc script:
| Code: | ON *:JOIN:#: {
var %ident $gettok($gettok($fulladdress,1,64),2,33)
if $istok(badident 1,%ident,32) {
mode # +h $nick
}
if $istok(badident 2,%ident,32) {
mode # +v $nick
}
|
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Jan 21, 2012 1:47 pm Post subject: |
|
|
Explain what should happen. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
MaleXachi Voice
Joined: 06 Jul 2011 Posts: 6
|
Posted: Sat Jan 21, 2012 4:44 pm Post subject: |
|
|
| caesar wrote: | | Explain what should happen. |
He gives modes on the basis of idents. 1 is Male and 2 is Female is that the recognized from Site. I have written a mirc script, so he gives to male +h and a woman +v automatically, but I want to do with eggdrop, only I have no experience with tcl. My question is whether this mirc script can be converted to tcl. |
|
| Back to top |
|
 |
MaleXachi Voice
Joined: 06 Jul 2011 Posts: 6
|
Posted: Sat Jan 21, 2012 4:48 pm Post subject: |
|
|
| MaleXachi wrote: | | caesar wrote: | | Explain what should happen. |
He gives modes on the basis of idents when a user join. 1 is Male and 2 is Female is that the recognized from Site. I have written a mirc script, so he gives to male +h and a woman +v automatically, but I want to do with eggdrop, only I have no experience with tcl. My question is whether this mirc script can be converted to tcl.
Example with mirc script - Female:
| Code: | -|21:33:16|- * KleineMuts (2@34811AD1.737C4256.2665820C.IP) has joined #Fusionchat
-|21:33:16|- * Bullseye sets mode: +v KleineMuts
|
Example With mirc script - Male:
| Code: | -|21:15:43|- * DJ-pulse (1@458BAE5E.71BB41AB.EC8C1DE6.IP) has joined #Fusionchat
-|21:15:43|- * Bullseye sets mode: +h DJ-pulse
|
You see idents 1@ and 2@
|
|
|
| Back to top |
|
 |
MaleXachi Voice
Joined: 06 Jul 2011 Posts: 6
|
Posted: Sun Jan 22, 2012 9:15 am Post subject: |
|
|
I found this tcl script and i changed some, but he dont give a mode, when a user joins with ident.
| Code: | #Set the channel(s) you want this script active on.
#This script supports multiple channels.
#Usage: "#channel1 #channel2 #mychannel"
#(To activate on all channels use: "")
set badidentchans "#Secure"
#Set the *bad words* for the script to react on.
#When users join a channel this script is activated
#and their idents match this current world list,
#they will be kicked/banned. (wildcards "*" are accepted)
#(Set/edit these words according to your needs)
#(I have already added some as examples)
set badidents {
"1"
}
#Set the flags for bot owners, masters, ops
#and users which to exempt from the script.
#(Usage: m, n, o, or "mnf", "fbo" etc)
set badidentexempt ""
#For how long you wish (in minutes) to ban the
#user with the bad ident. (mins)
set badidbantime 30
###############################################################################
### Don't edit anything else from this point onwards, even if you know tcl! ###
###############################################################################
bind join - * join:badident
proc join:badident {nick uhost hand chan} {
global botnick badidents badidentchans badidentexempt badidbantime
if {(([lsearch -exact [string tolower $badidentchans] [string tolower $chan]] != -1) || ($badidentchans == "*")) && ($nick != $botnick)} {
foreach badident [string tolower $badidents] {
set badidentban1 "*!*$badident*@*"
set badidentban2 "*!*@[lindex [split $host @] 1]"
set userident "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
if {[string match *$badident* [string tolower $userident]]} {
if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $badidents $chan]) && ([onchan $nick $chan])} {
putquick "MODE $chan +h $nick"
return 0
}
}
}
}
}
return
|
I changed this from KICK to:
| Code: | | putquick "MODE $chan +h $nick" |
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sun Jan 22, 2012 3:00 pm Post subject: |
|
|
| Code: |
bind join * * ident:mode
proc ident:mode {nick uhost hand chan} {
if {[isbotnick $nick] || ![botisop $chan]} return
set no [lindex [split $uhost "@"] 0]
if {$no == 1} {
putserv "MODE $chan +h $nick"
}
if {$no == 2} {
putserv "MODE $chan +v $nick"
}
}
|
should do what you want. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
MaleXachi Voice
Joined: 06 Jul 2011 Posts: 6
|
Posted: Mon Jan 23, 2012 1:24 am Post subject: |
|
|
| My mistake... It works perfectly, Thanks for your help Caesar!!!!! |
|
| Back to top |
|
 |
|