alias help

These are old archives. They are kept for historic purposes only.
Post Reply
ZeepySea
Posts: 5
Joined: Tue Jan 17, 2006 5:24 am

alias help

Post 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?
ZeepySea
Posts: 5
Joined: Tue Jan 17, 2006 5:24 am

Post 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-";
       };
};
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Post 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.
Why the hell can't my signature be empty?
"Your message contains too few characters."
Post Reply