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 

Mode lock

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


Joined: 28 Dec 2007
Posts: 12

PostPosted: Tue Jan 15, 2008 12:05 am    Post subject: Mode lock Reply with quote

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
View user's profile Send private message
DarkRaptor
Voice


Joined: 15 Apr 2006
Posts: 36
Location: Trois-Rivières, Qc

PostPosted: Tue Jan 15, 2008 1:10 am    Post subject: Reply with quote

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
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Tue Jan 15, 2008 10:01 am    Post subject: Reply with quote

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.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Tue Jan 15, 2008 10:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Zircon
Op


Joined: 21 Aug 2006
Posts: 191
Location: Montreal

PostPosted: Tue Jan 15, 2008 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Tue Jan 15, 2008 5:58 pm    Post subject: Reply with quote

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. Mr. Green
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Jan 15, 2008 6:56 pm    Post subject: Reply with quote

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


Joined: 28 Dec 2007
Posts: 12

PostPosted: Tue Jan 15, 2008 9:42 pm    Post subject: Reply with quote

I tryed .-chan and .+chan -> .chansave and even ediding .conf -> .rehash but no luck...
Any Tcl ideas or not?
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Jan 15, 2008 10:16 pm    Post subject: Reply with quote

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


Joined: 21 Aug 2006
Posts: 191
Location: Montreal

PostPosted: Wed Jan 16, 2008 1:56 am    Post subject: Reply with quote

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
View user's profile Send private message
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Wed Jan 16, 2008 10:41 am    Post subject: Reply with quote

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"
}

+
Code:

.rehash


Result exit with an error.
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Jan 16, 2008 11:29 pm    Post subject: Reply with quote

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


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Jan 17, 2008 8:35 am    Post subject: Reply with quote

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

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


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jan 17, 2008 11:42 am    Post subject: Reply with quote

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"
}

+
Code:

.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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
CyberianIce
Voice


Joined: 28 Dec 2007
Posts: 12

PostPosted: Thu Jan 17, 2008 12:08 pm    Post subject: Reply with quote

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