Page 1 of 1

alias help

Posted: Tue Jan 17, 2006 5:27 am
by ZeepySea
ok I made a bot that will respond to request and everything. Now I need to adjust the alias so it will msg the bot when certain params exist...
So if they type in /hs !vhost new.host it will set it for them.
Is this corect coding?

Code: Select all

alias hs {
 if ($% != !vhost) {
  target hostserv; type services;
 };
 else {
  target bot; type normal;
 };
};
Or did I do something wrong?

Posted: Tue Jan 17, 2006 5:45 am
by ZeepySea
nvm. i figured it out. wasn't thinking there for a moment

Code: Select all

alias hs {
        format "^!vhost" {
                target bot;
                type normal;
                parameters "%1-";
        };
        format "^[^!vhost]" {
                target hostserv;
                type services;
                parameters "%1-";
       };
};

Posted: Wed Jan 18, 2006 12:06 am
by Jason
No good.

Code: Select all

alias hs {
        format "^!vhost" {
                target bot;
                type normal;
                parameters "%1-";
        };
        format "^[^!]([^v]([^h]([^o]([^s]([^t].*)?)?)?)?)?$" {
                target hostserv;
                type services;
                parameters "%1-";
       };
};
Its hard to get accurate word negations with regexps. This will match what you think the other one did.