mIRC Home    About    Download    Register    News    Help

Print Thread
#241228 30/03/13 02:25 AM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
the /qroups function is very handy to check status of groups at any point in time. But,
I do not see the ability to display status for groups within ONE script.

A simulation of what is displayed will show what I mean..

This is only partial output of /groups command (without any parm): /groups (called from in a script)

-
* HorseC.mrc groups:
#hcwho off
#hcwhois off
#whatchan off
* netnotify.mrc groups:
[none]
......
.......
........
* HCalldal groups:
[none]
* Quote System.mrc groups:
#QSys_user_commands_trigger off
-

I would like to see the addition of script name
or $script on the command..

for example: /groups [-e|d] [$script| script_name_here]

If you have a script that, for example, triggers ability for users to issue command to the script (on text inside a group) it would help.

Right now, it shows the information, but lists every script one has loaded. This can be a very long list (why i only showed part of mine above..)

Having the ability to use $script would proved the ability to check status on groups in a particular script and would mean a much smaller display.

I mention all of this, because i have setup a script with a
dialog to set options (one being enable user commands), and
rather than make the user pull up the dialog to check the
current status of triggers it would be easier with a simple (I hope) change to the /groups command format.

Since I have a work around (the dialog to set triggers)
right now, this is not in any way an immediate need.

However, long term, i think it would be of user to script writers.


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Jun 2003
Posts: 81
T
TRT Offline
Babel fish
Offline
Babel fish
T
Joined: Jun 2003
Posts: 81
Groups are usually hidden from end users to avoid confusion. If the author wants to offer the changing of options via command line he can just create another alias that only checks the groups in his script.

If you want a more flexible approach that's also possible with just a few lines of code.

TRT #241240 30/03/13 07:40 PM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Originally Posted By: TRT
Groups are usually hidden from end users to avoid confusion. If the author wants to offer the changing of options via command line he can just create another alias that only checks the groups in his script.

If you want a more flexible approach that's also possible with just a few lines of code.


restricted from users? It's documented in help.

If you see the output from origonal post, it works! Just to much information.

Caa you explain why you say it is restricted, when it works now. But I would like it to provide less information.

oh! thought: /group is the command in mIRC that shows what groups you have enabled in scripts, are you thinking of another command maybe on an IRCD level ?


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Jun 2003
Posts: 81
T
TRT Offline
Babel fish
Offline
Babel fish
T
Joined: Jun 2003
Posts: 81
Unless the script is targeted at people with mSL knowledge your users are probably not familiar with the concept of groups and will need to read up on the syntax involved. *
That's one of the reasons scripters choose other forms of configuration (the other being it's usually cleaner to split up the script and its settings) which is probably why /groups is a fairly simplistic command.


* Granted, it's not that complicated but should still be avoided imo.

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Good idea.

I've taken the liberty of writing a script which supports this for the time being:

Code:
alias groups {
  if (!$0) { !groups } 
  elseif (($1 !isnum) || ($0 > 1)) && ($script($1-)) {
    var %i = 1, %file = $v1, %none = 1
    echo -ac info * $1- groups:
    while ($group(%i) != $null) {
      if ($group(%i).fname == %file) { 
        %none = 0
        echo -ac info2 $group(%i).name $group(%i).status
      }
      inc %i
    }
    if (%none) { echo -ac info2 [none] }
  }
  elseif ($1 isnum) && ($0 == 1) { echo -ac info * /groups: please specify a filename. }
  elseif (!$script($1-)) { echo -ac info * /groups: script file $qt($1-) is not loaded. }
}


/groups [script file]

----------

Originally Posted By: TRT
Unless the script is targeted at people with mSL knowledge your users are probably not familiar with the concept of groups and will need to read up on the syntax involved. *
That's one of the reasons scripters choose other forms of configuration (the other being it's usually cleaner to split up the script and its settings) which is probably why /groups is a fairly simplistic command.


* Granted, it's not that complicated but should still be avoided imo.


Seems like your argument is against /groups altogether, but given that /groups is already supported it makes sense to allow us to specify a script file.

Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Thanks for the script, this will help a great deal. Groups in script are very handy for enabling and disabling functions. A simply menu item for a channel menu can then turn on or off functions within a script. being able to identify (thanks to your script) the a group(s) within one script, I know can build a menu item function for the checking status on any group(s) in a single script without seeing ones in other scripts.



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!

Link Copied to Clipboard