Page 1 of 1

Alias /report

Posted: Mon Feb 22, 2021 6:17 pm
by Manuel
Hello, I have created the following alias in the alias configuration for the IRCd:

Code: Select all

alias report {
format "^ #" {
target Q;
type normal;
parameters "! report% 1-";
}
type command;
}

But now I want the command "! Report" to be executed in the channel via / report.

Re: Alias /report

Posted: Mon Feb 22, 2021 6:24 pm
by Windigo
Hi there!

IRC commands are sent using a forward-slash "/", where you send the string is down to your configuration.

!commands like that usually trigger bots, not servers. These types of commands are called "fantasy" commands, and the character "!" is a command char for a bot.

Long story short, you can't configure the server to use !commands, sorry!

Re: Alias /report

Posted: Mon Feb 22, 2021 6:34 pm
by Manuel
Again to write with!

I want the command "/report" to post this command "!report" in a channel and not on a bot.

And that works too!

Re: Alias /report

Posted: Mon Feb 22, 2021 6:41 pm
by Windigo
oh!

Code: Select all

alias report {
	format "^#" {
	
		target "#YourChannel";
		type normal;
		parameters "!report %1-";
		
	}
	type command;
}
like that? (I think that is right...)

Re: Alias /report

Posted: Mon Feb 22, 2021 6:45 pm
by Manuel
[19:45:01] [FEHLER] #opers ist kein gültiger raum - oder nickname !

Re: Alias /report

Posted: Mon Feb 22, 2021 10:46 pm
by Lord255
eyo.
did you guys check the man page?:)
https://www.unrealircd.org/docs/Alias_block

so.. you want to report to a channel, not a bot, but then why you use type normal ?


anyway, you could use this:

Code: Select all

alias report {
   format "^#" {
      target "PRIVMSG #opers !report";
      type real;
      parameters "%1-";
   }
   type command;
}
although this only works if the channel does not have +n on it, but it does do the job what you want.
i dont think that you can do this with +n on the channel.