mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
yeah i gotcha, i want to keep that second line just in case i do need approved people to be able to use the commands later on

Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
okay, i think the only problem we're having now is being able to clear the list.

so the "!bun2" command is just a command that shows who's in line, but doesn't delete them. this is perfect.

but the "!clear" command won't actually clear the list, because we tried it once and then tried to see who's in line but it still showed us in line:



this is the code i have for the !clear command:
Quote:
on *:text:!clear:#aribun21: {
if ($nick !isop $chan) return { write -c list.txt
msg $chan list reset. }
}

Last edited by kouyachi; 27/11/17 02:14 AM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
You were missing a line-ending or a pipe-symbol between 'return' and the command following it, so the write command to clear the .txt was the command line for the 'return' command, trying to return it as a text string to whatever called it. fixed:

Code:
on *:text:!clear:#aribun21: {
if ($nick !isop $chan) return
{ write -c list.txt 
msg $chan list reset. }
}

Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
this fixed it! AH thank you so much, pretty sure everything is fixed now and i'll be able to use it without any trouble. i can't thank you enough for helping me with all of this, and i'm sorry for so many messages as well, ahah. but thank you again ^^

Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
i think i just have one more question, could there be a command to see the number of people in the list? there's the commands to see the names of the people in the list but could i also get one just for the number of people in it?

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Code:
on *:text:!howmany:#aribun21: {
  msg $chan there are $calc($lines(list.txt)) people remaining in the list
}


If you want the above ignored while the list is closed, you know which line to borrow from the other !trigger.

You can also add the headcount to other commands. For example in !join, where the current message says

msg $chan Added $nick to the list

you can replace that command with something like:

Code:
msg $chan Added $nick as the $ord($calc($lines(list.txt))) person in the list


$ord(number) puts st, nd, rd, th after the number. i.e. 2nd 3rd 11th 21st

Adding the headcount to !join will cut way down on usage of the requested trigger.

Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
alright, sounds good smile thank you!

Joined: Sep 2017
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Sep 2017
Posts: 32
we've come across a little problem of the !next * command popping people out who aren't up next yet. and i think it has something to do with the !leave command. because it happens when people !leave the queue so it's like.. confused about the order >_<

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
can you paste the contents for both triggers? your script has been updated piecemeal so it's hard for me to know exactly what it looks like right now.

Page 2 of 2 1 2

Link Copied to Clipboard