|
Joined: Feb 2005
Posts: 194
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 194 |
Hey. For some reason, when i group all of my commands on one page, they dont work. When they are seperated on different pages, they work file. Here is an example of how I grouped them. Please let me know why they arent working when grouped like this:
_____________________________________________
;Onjoin Commands
#access on on *:JOIN:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) access $chan add owner $nick } on 4:JOIN:*:/mode # +q $nick | /access $chan add owner $nick on 3:JOIN:*:/mode # +o $nick | /access $chan add host $nick on 2:JOIN:*:/mode # +v $nick | /access $chan add voice $nick #access end
#opwelcome on on 4:JOIN:*:/query $nick Welcome. Please fulfil your administrative duties responsibly on 3:JOIN:*:/query $nick Welcome. Please fulfil your administrative duties responsibly on 2:JOIN:*:/query $nick Welcome. Please fulfil your administrative duties responsibly #opwelcome end
#topic on on *:JOIN:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) topic $chan Script/Bot Testing Open to all } #topic end
#welcome on on @*:JOIN:#:{ msg # Hello $nick , Welcome to $chan $+ . msg # There are $nick(#,0) people in the room. } #welcome end
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Feb 2005
Posts: 34
Ameglian cow
|
Ameglian cow
Joined: Feb 2005
Posts: 34 |
on 4:JOIN:*:/mode # +q $nick | /access $chan add owner $nick on 4:JOIN:*:/query $nick Welcome. Please fulfil your administrative duties responsibly As you can see the two above events are the same. So when mIRC reads the remote file the event is already being called. It already sees "on join" event and performs the first one, and then over looks the other because it's already present. But if they're on seperate pages, mIRC reads off of each page, and will perform both commands. I have had this problem many times myself. It only makes sense for this being the reason for the problem. Note: If I'm incorrect, some body please correct me - arkt1k
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
@k1tkra04 you're right However there is an on *:join: there too which will trap ALL joins. - You have to have the highest level first, the widest match last. Only the 1st matching event from each file will be processed. Try it like this
on [color:blue]me:[/color]*:JOIN:#:.timer 1 5 [color:brown]_access&topic #[/color]
#access on
on 4:JOIN:*:mode # +q $nick | access # add owner $nick | [color:green]_welcome[/color]
on 3:JOIN:*:mode # +o $nick | access # add host $nick | [color:green]_welcome[/color]
on 2:JOIN:*:mode # +v $nick | access # add voice $nick | [color:green]_welcome[/color]
#access end
#opwelcome on
on 2:JOIN:*:[color:green]_welcome[/color]
#opwelcome end
#welcome on
on @*:JOIN:#:{
msg # Hello $nick , Welcome to # $+ .
msg # There are $nick(#,0) people in the room.
}
#welcome end
[color:green]alias -l _welcome {
if $group(#opwelcome) == on {
query $nick Welcome. Please fulfil your administrative duties responsibly
}
}[/color]
[color:brown]alias -l _access&topic {
if $me isop $1 {
if $group(#access) == on { access $1 add owner $me }
if $group(#topic) == on { topic $1 Script/Bot Testing Open to all }
}
}[/color]
The _welcome alias which is called from all level 2 and over joins check for the #opwelcome groups status. In that group the code is the same for all levels so no need for any level 4, level 3 stuff there as 'on 2:stuff:' fires for level 2 and over. If you only want something to trigger for a certain level you can use on +2:, on +3:, etc. The _access&topic alias check both @access and #topic groups status. on me:*:event:... triggers for only YOU, it won't interfere with other people triggering an event, also means there isn't a need for "if $nick == $me" (BTW: there is an extra colon in on me events). This was moved to outside of the groups as it checks two seperate #groups status.
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 194 |
PERFECT! Thanks so much k1tkra04 and Iori!!!!
- Austin
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Uh oh, I just realized I left the #topic group out, it doesn't matter so much whats in it as the groups commands are executed from outside of it anyway ... sorry about that. #topic on on me:*:JOIN:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) topic $chan Script/Bot Testing Open to all } #topic end
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 194 |
;Onjoin Commands
on me:*:JOIN:#:.timer 1 5 _access&topic #
#welcome on
on @*:JOIN:#:{
.timer 1 3 msg # 12Hello $nick , Welcome to # $+ .12
.timer 1 3 msg # 12There are $nick(#,0) people in the room.12
}
#welcome end
#access on
[color:green]on 4:JOIN:*:mode # +q $nick | access # add owner $nick
on 3:JOIN:*:mode # +o $nick | access # add host $nick
on 2:JOIN:*:mode # +v $nick | access # add voice $nick[/color]
#access end
#topic on
on me:*:JOIN:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) topic $chan Script/Bot Testing Open to all }
#topic end
alias -l _access&topic {
if $me isop $1 {
if $group(#access) == on { access $1 add owner $me }
if $group(#topic) == on { topic $1 Script/Bot Testing Open to all }
}
}
This is what I have now. Notice i took out the op query (please be responsibe stuff). I may have gotten it out of order, because everyhting works except the access. When i come in with a nick on level 4, it doesnt +q them like it should. Can you help me put in in order again? Also, under the same circumstances (onjoin, me == isop) could you make it so that it sets the %pass variable to blahblah. Thanks a TON!
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Yeah remember what I said about the widest march last so it doesn't trap other events it shouldn't The "on *:join:" will trap ALL joins.
;Onjoin Commands
on me:*:JOIN:#:.timer 1 5 _access&topic #
#access on
; Added the @ prefix here
on @4:JOIN:#:mode # +q $nick | access # add owner $nick
on @3:JOIN:#:mode # +o $nick | access # add host $nick
on @2:JOIN:#:mode # +v $nick | access # add voice $nick
#access end
#topic on
on me:*:JOIN:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) topic $chan Script/Bot Testing Open to all }
#topic end
[color:blue]#welcome on
; Moved this back to last
on @*:JOIN:#:{
.timer 1 3 msg # 12Hello $nick , Welcome to # $+ .12
.timer 1 3 msg # 12There are $nick(#,0) people in the room.12
}
#welcome end[/color]
alias -l _access&topic {
if $me isop $1 {
if $group(#access) == on { access $1 add owner $me }
if $group(#topic) == on { topic $1 Script/Bot Testing Open to all }
}
}
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 194 |
Hey: #welcome on
on @*:JOIN:#:{
.timer 1 3 msg # Hello $nick , Welcome to # $+ .
.timer 1 3 msg # There are $nick(#,0) people in the room.
}
#welcome end This part doesnt work. Now im not familiar with the "@" symbol, but i need it to welcome all visitore not just ops. Im confused Please let me know what im doing wrong.
Last edited by alhammer; 12/02/05 01:18 PM.
|
|
|
|
Joined: Dec 2002
Posts: 145
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 145 |
/help access levels
The @ prefix You can limit events to being executed only when you have Ops on a channel by using the @ prefix.
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 194 |
This is weird. From what i know now after testing it for a while, it appears that it WONT welcome a person if they are on my userlist. Im really confused now. please help
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
this whole debockle is why i use one on join for all my on join needs i think i showed you al if not look at the onjoin in my bot
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Dec 2002
Posts: 145
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 145 |
You could save into in a file by itself, then no other "on join" events will interfere with it.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Yeah my bad, I assumed because you had the #opwelcome for 'admins' that the generic was only for others #access on
on 4:JOIN:*:mode # +q $nick | access # add owner $nick | [color:green]_welcome[/color]
on 3:JOIN:*:mode # +o $nick | access # add host $nick | [color:green]_welcome[/color]
on 2:JOIN:*:mode # +v $nick | access # add voice $nick | [color:green]_welcome[/color]
#access end
[color:green]alias -l _welcome {
if $group(#welcome) == on {
msg # Hello $nick , Welcome to # $+ .
msg # There are $nick(#,0) people in the room.
}
}
|
|
|
|
|