swimsphinx commented on a Page, Custom Command Adding and Deleting Script  -  Apr 23, 2015

Hi Lozo, first off thank you so much for posting this, not only does it work amazingly but it also helped me learn alot about how to structure things in mIRC. I don't know if you check this page but if you do a response would be great :). I see in the description that the program auto prepends a "!" to any added command is there anyway to turn this off/ make it not work for specific commands? ex: i want to add a command that will respond whenever a person types a word "hi" for instance but not "!hi" im pretty new to coding so i can't really figure out where the prepending occurs. Any pointers?

Lozo  -  Apr 24, 2015

Hey

I'm really behind on responding to questions on this code, but you did ask a excellent question which I am able to help you with.

First off, this bit of code

on $*:TEXT:m/\!.*/iS:#:{

Needs to be replaced with

on $*:TEXT:*:#:{

Then, where you see this bit of code on the event I told you to edit above

        var %cmd = $mid($1,2)

Replace that with

        var %cmd = $mid($1,1)

This will make all commands work simply by typing the command name without a ! or anything before it.

Let me know if this worked
Lozo

Lozo  -  Apr 24, 2015

I should add, changing this won't change any of the help messages that say things like 'the command !help has been added' - The command will still work as 'help' and not '!help' when you make the changes I have suggested.

swimsphinx  -  Apr 24, 2015

Thanks a ton! for the response works like a charm. i figured out the first bit on my own while tinkering around but couldn't get the second part, this cleared it up quite well. thank you :)

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.