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 

Gline if not in chans

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


Joined: 19 Apr 2007
Posts: 1

PostPosted: Sun May 06, 2007 6:20 am    Post subject: Gline if not in chans Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun May 06, 2007 8:19 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue May 08, 2007 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
xU
Voice


Joined: 24 May 2007
Posts: 7

PostPosted: Thu May 24, 2007 4:07 pm    Post subject: Reply with quote

Hi Very Happy
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
View user's profile Send private message MSN Messenger
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