your did -fu $dname is missing a dialog id number
When you use the -x flag you only need to name the dialog once, and in fact, the way you have that at the moment you can just use did -x $dname
The dialog -ma test test is fine, except what if the dialog is already open? You'll get an (ugly imo) error message.Check to see if the dialog is open using an $iif
alias _test dialog $iif($dialog(test),-x,-ma test) test
You could play around with these $iifs too if you felt like it.
did $iif(m isincs $chan(%channel).mode,-c,-u) test 38
mode $chan $iif(m isincs $chan(%channel).mode,+m,-m)
if ($active !ischan) return
I know there is noting suckier than someone telling you to read the help file, but the dialog part of the help file covers alot of good stuff.
There's no need for the f flag either as -c will check the box
I used to use:
alias _load.modes {
if ($active !ischan) return
var %mc = $chan($active).mode
if (m isincs %mc) did -c _options 52
if (N isincs %mc) did -c _options 78
if (I isincs %mc) did -c _options 43
if (R isincs %mc) did -c _options 44
if (L isincs %mc) did -c _options 45
if (f isincs %mc) did -c _options 46
if (G isincs %mc) did -c _options 76
if (C isincs %mc) did -c _options 77
if (n isincs %mc) did -c _options 71
if (t isincs %mc) did -c _options 70
if (Q isincs %mc) did -c _options 81
if (c isincs %mc) did -c _options 73
if (M isincs %mc) did -c _options 82
if (T isincs %mc) did -c _options 79
if (j isincs %mc) did -c _options 60
if (w isincs %mc) did -c _options 61
if (p isincs %mc) did -c _options 80
if (l isincs %mc) did -i _options 84 1 * $gettok(%mc,-1,32)
if (K isincs %mc) did -c _options 72
if (R isincs %mc) did -c _options 74
}
but even then I don't like it, it's too long and messy for such basic code. $iif would work just as well to clean it up as well.
menu * {
joining dialog:/dialog -ma test test
You're missing a closing bracket. I'd think twice about assigning the * to all the popups, plus, when you're not connected you don't need to see the dialog on the popup menu..
A cleaner way to open the dialog would be to use an $iif so as you don't get "the dialog already in use error message by using:
dialog $iif($dialog(test),-x,-m test) test
set %channel $active
What if the $active window was the status window?
if ($active ischan) or if ($active == $chan) can sort that out nicely. then you can use a return if the $active window isn't the #channel
When using dialog flags you can condense control id's, for example:
did -h test 63,64,65,66
Can be:
did -h test 63-66
makes it neater and you can also separate clumps with a comma like 63-66,74-82 etc
How old would the topic be? Look at RAWS 331-333 and have a look there for possible errors/conflicts.
RAW 331:*:{
haltdef
echo -tm No topic has been set for $2 $+ .
}
RAW 332:*:{
haltdef
echo -tm $2 The chat's topic is: $strip($3-)
}
RAW 333:*:{
haltdef
echo -tm Set by $3 at $asctime($4, hh:nntt dd/mm/yy) $+ .
}
@Hawkee Hi Hawkee, and you're welcome. It just made me quite mad. Russel is a genius, and like so many ppl on sites such as these, they volunteer their time to help ppl learn etc so it really pissed me off to see this guy not only claim Russel's work as their own but then had the nerver to tell us not rip his work!!
PS - I should remove a snippet I posted then. It was not written by me, but I gave the author 100% credit plus he gave me permission to share it. The reson being I find it such a helpful alias and wanted to share it with my peers.
space between else and if (Redundant either way)
Ummm, /youtube but the alias is "yt" so shouldn't the trigger be /yt
also got > * Invalid format: $replace (line 230, script7.mrc)
Which is:
echo -a Searching YouTube for $replace($replace(%ytsearch,$left(%ytsearch,1),$upper($left(%ytsearch,1))),$asc(43),$null $+ ...
else if ($1 == $null) { echo nothing entered, halting | halt }
would look nicer as:
elseif (!$1) echo -at No query entered.