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.

Gline if not in chans

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
D
Daemon
Voice
Posts: 1
Joined: Thu Apr 19, 2007 12:49 pm

Gline if not in chans

Post by Daemon »

Hello!

I hope anyone can help me to translate the following snippet to TCL ..

mIRC-Code

Code: Select all

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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

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.
Last edited by Sir_Fz on Thu May 24, 2007 4:37 pm, edited 1 time in total.
x
xU
Voice
Posts: 7
Joined: Thu May 24, 2007 4:04 pm

Post by xU »

Hi :D

Code: Select all

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!"}
}
Post Reply