| View previous topic :: View next topic |
| Author |
Message |
Daemon Voice
Joined: 19 Apr 2007 Posts: 1
|
Posted: Sun May 06, 2007 6:20 am Post subject: Gline if not in chans |
|
|
Hello!
I hope anyone can help me to translate the following snippet to TCL ..
mIRC-Code
| Code: | on *:join:#test:{
if (*Serv* isin $nick) { halt }
if ($nick ison #abuse) { halt }
if ($nick ison #opers) { halt }
if ($nick ison #ops) { halt }
if ($nick ison #bots) { halt }
if ($nick ison #irc) { halt }
if ($nick == $me) { halt }
else {
.gline $nick 86400 due to xdcc abuse!
}
} |
... OR ...
If a user that join the channel #test and is on #abuse / #opers / #ops / #bots or #irc, than NO gline.
If the user isn't on one (or more) of these channels, than gline.
I hope you know what I mean.
Excuse my bad English.
Thanks & greets
Daemon
Edit: Changed topic subject to clarify the request. (Sir_Fz)
Last edited by Daemon on Sun May 06, 2007 6:05 pm; edited 2 times in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun May 06, 2007 8:19 am Post subject: |
|
|
I suggest you change the topic and content of your post to an actual script request where you just state what you want your bot to do. Otherwise, this topic will be moved to the junk yard. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue May 08, 2007 7:25 am Post subject: |
|
|
| Code: | bind join - * gline:check
proc gline:check {nick uhost hand chan} {
if {[string match *Serv* $nick] || [isbotnick $nick]} {return 0}
set onchans 1
foreach c {opers abuse ops bots irc} {
if {[onchan $nick #$c]} {continue}
set onchans 0
break
}
if {!$onchans} {
putserv "gline $nick 86400 :due to xdcc abuse!"
putlog "glined $nick due to xdcc abuse!"
}
} |
btw, the subject is still invalid please change it to something relevant (e.g. "gline if not on chans").
Edit: Added ':' in gline raw command. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts
Last edited by Sir_Fz on Thu May 24, 2007 4:37 pm; edited 1 time in total |
|
| Back to top |
|
 |
xU Voice
Joined: 24 May 2007 Posts: 7
|
Posted: Thu May 24, 2007 4:07 pm Post subject: |
|
|
Hi
| Code: | set chans "#abuse #opers #ops #bots #irc"
bind join - * gline:join
proc gline:join { nick host hand chan } {
global chans
if {([string match -nocase "*serv* $nick]) || ([isbotnick $nick])} {reutrn 0}
foreach c $chans {
if {([onchan $nick $c]) || ([info exists x])} {set x ok
} else {continue}
}
if {(![info exists x])} {putquick "gline $nick 86400 :due to xdcc abuse!";putlog "glined $nick due to xdcc abuse!"}
} |
|
|
| Back to top |
|
 |
|