Making a command list - 23/08/15 07:22 PM
I'm having some trouble making a command that shows other created commands in a channel. Here's what I have so far
With this I can add and remove commands, and write the command names into a txt file for use for the command list. Problem is I can't figure out how to actually get the list to work. I need all the commands to show in one message, and the ability to delete commands in the list. I've tried putting all commands in the list on different lines which makes it easy to delete them, but then I don't know how to make it so all of them are displayed in one message, and I've tried appending commands to the first line, but then I can't delete them when they're removed naturally. Would anyone be able to help?
Code:
on *:TEXT:!cmd*:#: { if ($nick isop #) { if ($2 == add) { write -c txt\ $+ $+(#,.,$3,.txt) $$4- write txt\ $+ $+(#,.,commandlist.txt) $3 msg $chan Command added. } if ($2 == remove) { remove txt\ $+ $+(#,.,$3,.txt) msg $chan Command removed } } } on *:TEXT:!*:#: { msg $chan $read(txt\ $+ $+(#,.,$1,.txt)) }
With this I can add and remove commands, and write the command names into a txt file for use for the command list. Problem is I can't figure out how to actually get the list to work. I need all the commands to show in one message, and the ability to delete commands in the list. I've tried putting all commands in the list on different lines which makes it easy to delete them, but then I don't know how to make it so all of them are displayed in one message, and I've tried appending commands to the first line, but then I can't delete them when they're removed naturally. Would anyone be able to help?