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.

need a tcl with a oppositi use of "bad channel"

Old posts that have not been replied to for several years.
Locked
W
Wrongtruth

need a tcl with a oppositi use of "bad channel"

Post by Wrongtruth »

Hi,

I'm searching for a tcl that will allow users to join only if they are on other specific channel... its kind of the opposite of "bad channel"
i've been searching for it and didnt find it
Thank you for helping me if u can
sincerly, Joe
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Is the bot in both channels, or just one?
W
Wrongtruth

Post by Wrongtruth »

Both channels :)
but can have it only in one if u want ...
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

This isn't tested, but it should work. The bot has to be in both channels.

Code: Select all

# Channel to protect
set cochannel(watch) "#privatechannel"

# Channel the person must also be in
set cochannel(require) "#otherchannel"



if {[info exists cochannel(oldwatch)]} {
  unbind join - "$cochannel(oldwatch) *" cochannel_on_join
}
bind join - "$cochannel(watch) *" cochannel_on_join
set cochannel(oldwatch) $cochannel(watch)

proc cochannel_on_join {nick uhost hand chan} {
  global cochannel
  if {![onchan $nick $cochannel(require)]} {
    putserv "KICK $chan $nick :get your loose ass out of here"
    # add ban code here if you want
  }
  return 0
}
W
Wrongtruth

Post by Wrongtruth »

Thanks for your help
I tested it but it dont work
If you can make any modification if possible
And thanks again :)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Uhh, now I tested it and it works.
W
Wrongtruth

this is the error i get :)

Post by Wrongtruth »

invalid command name "\rtf1\ansi\ansicpg1252\deff0\deflang1036{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\froman\fcharset0 Times New Roman;}{\f2\fswiss\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\sb100\sa100\cf1\f0\fs20 # Channel to protect \line set cochannel(watch) "#hecgames" \line\line # Channel the person must also be in \line set cochannel(require) "#hec" \line\line\line\line if \{[info exists cochannel(oldwatch)]\} \{ \line unbind join - "$cochannel(oldwatch) *" cochannel_on_join \line\} \line bind join - "$cochannel(watch) *" cochannel_on_join \line set cochannel(oldwatch) $cochannel(watch) \line\line proc cochannel_on_join \{nick uhost hand chan\} \{ \line global cochannel \line if \{![onchan $nick $
[15:16] * FICHIER DE CONFIGURATION NON CHARGE (INTROUVABLE OU ERREUR)
HEC@box1(~/eggdrop)$
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Re: this is the error i get :)

Post by dollar »

Wrongtruth wrote:invalid command name "\rtf1\ansi\ansicpg1252\deff0\deflang1036{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\froman\fcharset0 Times New Roman;}{\f2\fswiss\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\sb100\sa100\cf1\f0\fs20 # Channel to protect \line set cochannel(watch) "#hecgames" \line\line # Channel the person must also be in \line set cochannel(require) "#hec" \line\line\line\line if \{[info exists cochannel(oldwatch)]\} \{ \line unbind join - "$cochannel(oldwatch) *" cochannel_on_join \line\} \line bind join - "$cochannel(watch) *" cochannel_on_join \line set cochannel(oldwatch) $cochannel(watch) \line\line proc cochannel_on_join \{nick uhost hand chan\} \{ \line global cochannel \line if \{![onchan $nick $
[15:16] * FICHIER DE CONFIGURATION NON CHARGE (INTROUVABLE OU ERREUR)
HEC@box1(~/eggdrop)$
Errr, did something go wrong with pasting of the code to a .tcl file? :/
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yup. Try a different text editor. Looks like you used wordpad or word or something.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

No, wordpad is not doing that thing, I'm using it :P Probably is M$ W0rd or something like it.. so, either stick to notepad or just paste the TCL code directly in pico. :P
Once the game is over, the king and the pawn go back in the same box.
Locked