This is my channel modes manager, any ideas on how i could make this better let me know..
If you find any problems let me know ill be at
irc.ezzychat.com #Lobby
or
irc.swiftirc.net #PMS
Enjoy :)
Uh.. type /cmm to get it started :)
alias CMM { Dialog -nmrv CMM CMM }
dialog CMM {
Title "Manager"
size -1 -1 67 196
option dbu
Box "Channel Modes:", 1, 1 1 93 195
Check "Moderated", 2, 3 10 40 10
Check "No Swearing", 3, 3 20 40 10
Check "No Nick Change", 4, 3 30 50 10
Check "No CTCP", 5, 3 40 50 10
Check "No Kicks", 6, 3 50 40 10
Check "No Notices", 7, 3 60 40 10
Check "No Invites", 8, 3 70 40 10
Check "No Knock", 9, 3 80 40 10
Check "Invite Only", 10, 3 90 40 10
Check "Strip Color", 11, 3 100 40 10
Check "Registered Only", 12, 3 110 60 10
Check "Registered Talk Only", 13, 3 120 70 10
Check "Topic Lock", 14, 3 130 40 10
Check "IRCOP Only", 15, 3 140 40 10
Check "Private Channel", 16, 3 150 50 10
Check "Secret", 17, 3 160 40 10
Button "Done", 18, 2 182 63 11, Flat ok
}
on *:Dialog:CMM:sclick:2: { if ($did(2).state) { .mode $active +m } | else { .mode $active -m } }
on *:Dialog:CMM:sclick:3: { if ($did(3).state) { .mode $active +G } | else { .mode $active -G } }
on *:Dialog:CMM:sclick:4: { if ($did(4).state) { .mode $active +N } | else { .mode $active -N } }
on *:Dialog:CMM:sclick:5: { if ($did(5).state) { .mode $active +C } | else { .mode $active -C } }
on *:Dialog:CMM:sclick:6: { if ($did(6).state) { .mode $active +Q } | else { .mode $active -Q } }
on *:Dialog:CMM:sclick:7: { if ($did(7).state) { .mode $active +T } | else { .mode $active -T } }
on *:Dialog:CMM:sclick:8: { if ($did(8).state) { .mode $active +V } | else { .mode $active -V } }
on *:Dialog:CMM:sclick:9: { if ($did(9).state) { .mode $active +K } | else { .mode $active -K } }
on *:Dialog:CMM:sclick:10: { if ($did(10).state) { .mode $active +i } | else { .mode $active -i } }
on *:Dialog:CMM:sclick:11: { if ($did(11).state) { .mode $active +s } | else { .mode $active -s } }
on *:Dialog:CMM:sclick:12: { if ($did(12).state) { .mode $active +R } | else { .mode $active -R } }
on *:Dialog:CMM:sclick:13: { if ($did(13).state) { .mode $active +M } | else { .mode $active -M } }
on *:Dialog:CMM:sclick:14: { if ($did(14).state) { .mode $active +t } | else { .mode $active -t } }
on *:Dialog:CMM:sclick:15: { if ($did(15).state) { .mode $active +O } | else { .mode $active -O } }
on *:Dialog:CMM:sclick:16: { if ($did(16).state) { .mode $active +p } | else { .mode $active -p } }
on *:Dialog:CMM:sclick:17: { if ($did(17).state) { .mode $active +s } | else { .mode $active -s } }
on *:dialog:CMM:init:0:{
$iif(m isin $chan($active).mode,did -c $dname 2)
$iif(G isin $chan($active).mode,did -c $dname 3)
$iif(N isin $chan($active).mode,did -c $dname 4)
$iif(C isin $chan($active).mode,did -c $dname 5)
$iif(Q isin $chan($active).mode,did -c $dname 6)
$iif(T isin $chan($active).mode,did -c $dname 7)
$iif(V isin $chan($active).mode,did -c $dname 8)
$iif(K isin $chan($active).mode,did -c $dname 9)
$iif(i isin $chan($active).mode,did -c $dname 10)
$iif(s isin $chan($active).mode,did -c $dname 11)
$iif(R isin $chan($active).mode,did -c $dname 12)
$iif(M isin $chan($active).mode,did -c $dname 13)
$iif(t isin $chan($active).mode,did -c $dname 14)
$iif(O isin $chan($active).mode,did -c $dname 15)
$iif(p isin $chan($active).mode,did -c $dname 16)
$iif(s isin $chan($active).mode,did -c $dname 17)
}
Well how would i get it to disable the modes if it isnt supported.. is there even a way to check for that
You can check it by using $chanmodes.
Also. Do you know if it can check what modes are selected and what ones arent so it can be automatically checked to cause no confusion.
You can use $chan(#channel).mode to determined the enable modes for the specified channel.
Im totally agree with others by using on init to check the current enable channel modes. However, its lack something such as when user keep the dialog open and the other channel operator changed a channel modes(or the user itself changed it manually).
So you need to watch the on mode event, and disable/enable the modes in dialog according to the current channel modes.
By using on active event also you can had one dialog for the whole channels, in other word the dialog would shown the correct modes for the active channel.
on :Dialog:CMM:sclick:23: { if ($did(23).state) { .mode $active +t } | else { .mode $active -t } }
on :Dialog:CMM:sclick:19: { if ($did(19).state) { .mode $active +t } | else { .mode $active -t } }
on *:Dialog:CMM:sclick:20: { if ($did(20).state) { .mode $active +T } | else { .mode $active -T } }
I know the T is different but 19 and 23 are the same.
It doesn't seem like a good way but it's all I can think of. Do something like this on init and then if s isn't in the modes it sets disable the box. Idk.
mode $chan +abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ $str(1 $+ $chr(32),52)
You might already know this but you can use
on *:Dialog:CMM:*:*: {
if ($devent == sclick) {
if ($did == #) { }
if ($did == #) { }
}
}
Also you have 2 Topic locks, 19 and 23 I think. Oh and unless it's different for different networks +s is secret not +S shrug
Ahhkay i knew that was coming about the network's i was going to add something like join throttling but i really got snagged by the edit and how to incorperate that with the other stuff.. so yeah.
Well how would i get it to disable the modes if it isnt supported.. is there even a way to check for that?
Also. Do you know if it can check what modes are selected and what ones arent so it can be automatically checked to cause no confusion.
I assume this script would working in some network only(especially the network that had implemented the specified chan modes...which many of them are unfamiliar for me).
IMO this is a simple script with a nice dialog and maybe you could added a couple thing on it such as:
Anyway... its really something useful for the operators
Nice job