| View previous topic :: View next topic |
| Author |
Message |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Tue Jan 15, 2008 12:05 am Post subject: Mode lock |
|
|
Hi there, I need a Tcl script wich will make a Bot to keep three different channel modes to three different channels (Bot should return predefined channel modes if an channel mod change detect). Each mode for each channes.
i.e
For #channel1
Keep these modes +nt-iklmps
For #channel2
Keep these modes +nt-klps
For #channel3
Keep these modes +nt-iklps
Any ideas? |
|
| Back to top |
|
 |
DarkRaptor Voice

Joined: 15 Apr 2006 Posts: 36 Location: Trois-Rivières, Qc
|
Posted: Tue Jan 15, 2008 1:10 am Post subject: |
|
|
Hi,
I think this can do the job.
| Code: |
.chanset #channel chanmode ±channelmode
|
| Quote: |
chanmode: These modes are enforced on the channel. Both + and - modes can be enforced.
|
_________________ DarkRaptor @ irc.undernet.org |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Tue Jan 15, 2008 10:01 am Post subject: |
|
|
DarkRaptor is 100% correct. You do not need any script to set channel modes, use .chanset to set them. Also be aware, if you have preset channels in the conf file under the channel add section, you might want to set them to the same modes you are wishing to enforce in your channels. _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Tue Jan 15, 2008 10:48 am Post subject: |
|
|
I asked for Tcl script, not module based solution, coz I know that module based is better solution, but I already tryed that, and it did not work. However I will try to figure out why did'nt work, or ill made my very own, i guess very simple, Tcl script, wich should be just triggered on channel mode change, and set them back to +nt-lpmisk. Whatever i do, i will post here when i'm done
Tnx anyway |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Tue Jan 15, 2008 1:43 pm Post subject: |
|
|
| Code: | .chanset #channel1 chanmode +nt-iklmps
.chanset #channel2 chanmode +nt-klps
.chanset #channel3 chanmode +nt-iklps |
I think this is the easiest and fastest way to do it....the command .chanset require to load the module channels, which anyway you need to load, coz without it, you won't be able to make the bot join a channel or save channel specific userfile information. |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Tue Jan 15, 2008 5:58 pm Post subject: |
|
|
you asked for a tcl script, but as we already told you, a tcl is not needed to enforce modes in a channel. If you say you already tried that, and it didn't work, then you must have a conflict in your conf file, or another tcl script in interfering.  _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 15, 2008 6:56 pm Post subject: |
|
|
| CyberianIce wrote: | | but I already tryed that, and it did not work. |
Do as Zircon posted as altering a config will not work on an already created channel file.
chanset _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Tue Jan 15, 2008 9:42 pm Post subject: |
|
|
I tryed .-chan and .+chan -> .chansave and even ediding .conf -> .rehash but no luck...
Any Tcl ideas or not? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 15, 2008 10:16 pm Post subject: |
|
|
| CyberianIce wrote: | I tryed .-chan and .+chan -> .chansave and even ediding .conf -> .rehash but no luck...
Any Tcl ideas or not? |
No because there is no point (if DarkRaptor's post was followed).
| Code: | | .chanset #channel chanmode +ptnM-k |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Wed Jan 16, 2008 1:56 am Post subject: |
|
|
Before using .chanset to enforce the modes in a certain channel, are you sure that the bot is already in that channel ? the command .+chan make the bot join the channel, and .-chan part that channel, and has nothing to do with modes, so first : do
| Code: | .+chan #channel1
.+chan #channel2
.+chan #channel3 |
After do the .chanset commands i recommended above. Yu don't need to use .chansave, you dont even need to rehash... |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Wed Jan 16, 2008 10:41 am Post subject: |
|
|
Ok, I see You not understand me, I tryed this commands:
| Code: |
.+chan #channel1
.+chan #channel2
.+chan #channel3
.chanset #channel1 chanmode +nt-ipsmlk
.chanset #channel2 chanmode +nt-ipsmlk
.chanset #channel3 chanmode +nt-ipsmlk
.chansave
|
Did not work.
Adding this code in config.conf:
| Code: |
channel add #channel1 {
chanmode "+nt-ipsmlk"
}
channel add #channel2 {
chanmode "+nt-ipsmlk"
}
channel add #channel3 {
chanmode "+nt-ipsmlk"
}
|
+
Result exit with an error. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Jan 16, 2008 11:29 pm Post subject: |
|
|
| CyberianIce wrote: | Ok, I see You not understand me, I tryed this commands:
| Code: |
.chanset #channel1 chanmode +nt-ipsmlk
.chanset #channel2 chanmode +nt-ipsmlk
.chanset #channel3 chanmode +nt-ipsmlk
|
|
This _does_ work. You might have chanset unbound in your eggdrop.conf, or you might not have priveleges to set these 'aka your not known as the bot owner'. If your using a network with services, why not just have Chanserv keep these modes enforced? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Jan 17, 2008 8:35 am Post subject: |
|
|
CyberianIce: You are expected to actually change "#channel1" &c to the actual channel name of the channels the bot is currently sitting in.
Also, a bot must have channel access.
You were also told that altering the configuration file will NOT affect channels the bot is already residing in. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Jan 17, 2008 11:42 am Post subject: |
|
|
| CyberianIce wrote: | Adding this code in config.conf:
| Code: |
channel add #channel1 {
chanmode "+nt-ipsmlk"
}
channel add #channel2 {
chanmode "+nt-ipsmlk"
}
channel add #channel3 {
chanmode "+nt-ipsmlk"
}
|
+
Result exit with an error. |
You don't think you could post the actual error message?
The only case in which I can see that code causing any kind of error would be if the channels-module isn't loaded - but if that's the case, your bot really would'nt be joining the channel in the first case, and .+chan and similar commands would not be available either.
Edit: Also worth noting, users with master and higher access, aswell as the bot itself may override the chanmode settings with their own settings. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
CyberianIce Voice
Joined: 28 Dec 2007 Posts: 12
|
Posted: Thu Jan 17, 2008 12:08 pm Post subject: |
|
|
| Quote: |
Also worth noting, users with master and higher access, aswell as the bot itself may override the chanmode settings with their own settings
|
That's it! That must be the answer why mlock did not work. Probably coz I (Admin) am the only one who tested it... |
|
| Back to top |
|
 |
|