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.

Mode lock

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
C
CyberianIce
Voice
Posts: 12
Joined: Fri Dec 28, 2007 3:21 am

Mode lock

Post by CyberianIce »

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?
Image
User avatar
DarkRaptor
Voice
Posts: 36
Joined: Sat Apr 15, 2006 2:39 am
Location: Trois-Rivières, Qc

Post by DarkRaptor »

Hi,

I think this can do the job.

Code: Select all

.chanset #channel chanmode ±channelmode
chanmode: These modes are enforced on the channel. Both + and - modes can be enforced.
DarkRaptor @ irc.undernet.org
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

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.
C
CyberianIce
Voice
Posts: 12
Joined: Fri Dec 28, 2007 3:21 am

Post by CyberianIce »

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
Image
Z
Zircon
Op
Posts: 191
Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal

Post by Zircon »

Code: Select all

.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.
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

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. :mrgreen:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
C
CyberianIce
Voice
Posts: 12
Joined: Fri Dec 28, 2007 3:21 am

Post by CyberianIce »

I tryed .-chan and .+chan -> .chansave and even ediding .conf -> .rehash but no luck...
Any Tcl ideas or not?
Image
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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: Select all

.chanset #channel chanmode +ptnM-k
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Z
Zircon
Op
Posts: 191
Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal

Post by Zircon »

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: Select all

.+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...
C
CyberianIce
Voice
Posts: 12
Joined: Fri Dec 28, 2007 3:21 am

Post by CyberianIce »

Ok, I see You not understand me, I tryed this commands:

Code: Select all

.+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: Select all

channel add #channel1 {
    chanmode "+nt-ipsmlk"
}
channel add #channel2 {
    chanmode "+nt-ipsmlk"
}
channel add #channel3 {
    chanmode "+nt-ipsmlk"
}
+

Code: Select all

.rehash
Result exit with an error.
Image
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

CyberianIce wrote:Ok, I see You not understand me, I tryed this commands:

Code: Select all

.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?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

CyberianIce: You are expected to actually change "#channel1" &c to the actual channel name of the channels the bot is currently sitting in. :P

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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

CyberianIce wrote:Adding this code in config.conf:

Code: Select all

channel add #channel1 {
    chanmode "+nt-ipsmlk"
}
channel add #channel2 {
    chanmode "+nt-ipsmlk"
}
channel add #channel3 {
    chanmode "+nt-ipsmlk"
}
+

Code: Select all

.rehash
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
C
CyberianIce
Voice
Posts: 12
Joined: Fri Dec 28, 2007 3:21 am

Post by CyberianIce »

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...
Image
Post Reply