Anope IRC Services

Anope Development => Modules => Topic started by: Zoddo on June 05, 2014, 08:22:06 PM

Title: OnPreCommand: Know which command is executed
Post by: Zoddo on June 05, 2014, 08:22:06 PM
Hi !

Firstly, sorry for my bad English.

I develop a module for myself and I would know which command is executed in the event OnPreCommand.
I don't find function to make it in the class Command
Title: Re: OnPreCommand: Know which command is executed
Post by: Adam on June 05, 2014, 08:24:08 PM
Code: [Select]
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params);

'command' is the command executed.
Title: Re: OnPreCommand: Know which command is executed
Post by: Zoddo on June 05, 2014, 08:26:50 PM
Yes, but how to know the command ? I don't find a method in the class Command to do so.
Title: Re: OnPreCommand: Know which command is executed
Post by: Adam on June 05, 2014, 08:30:08 PM
You mean source.command?
Title: Re: OnPreCommand: Know which command is executed
Post by: Zoddo on June 05, 2014, 08:32:35 PM
Oh, Thanks you! I didn't really pay attention to CommandSource class.