IRC Help ! To give Permission
#1

Hi,
I Want to Make IRCCMD / With Include irc.inc,
So I Want to Make PM command on IRC How to create thats ?
Reply
#2

The scripts instructions for the plugin explain a lot. ****** can show some more.

Should only use authenticated users from IRC for chatting otherwise someone could just join and spam.
Reply
#3

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
The scripts instructions for the plugin explain a lot. ****** can show some more.

Should only use authenticated users from IRC for chatting otherwise someone could just join and spam.
In Any IRC Server .. The Guest can Send Message to Server
Reply
#4

can you show us your !say cmd ?
Reply
#5

Quote:
Originally Posted by JeaSon
Посмотреть сообщение
can you show us your !say cmd ?
Solved With Say command !

My problem now is , PM Command / How to make thats ?
Reply
#6

Show your say command, then at least someone may be able to copy and paste you a solution, but really, this isn't what Scripting Help is for.
Reply
#7

Код:
IRCCMD:pm(botid, channel[], user[], host[], params[]) {
	
	new userid, message[119], string[128];
	if(sscanf(params, "us", userid, message)) return 0; // Return a message here using IRC_Say, this checks whether the parameters are filled

	if(!IsPlayerConnected(userid)) return 0; // Return a message here using IRC_Say, this checks whether a user is connected or not

	if(strlen(message) > 118) return 0; // Return a message using IRC_Say (Ensures the maximum amount of characters has not been reached)

	/* 
		The string length is 118 because if a user has 9 characters in their name on the irc, and the message reaches all of the string length
	   	it will cut it off at the end because it can not show more than 128 characters at once.
	*/  

	format(string, sizeof(string), "%s: %s", user, message);
	SendClientMessage(userid, 0xFFFFFF, string);

	// Use IRC_Say to inform the user about the successfully sent message, example:
	IRC_Say(botid, user, "Successfully sent a PM!");
	return 1;
}
I probably made a few mistakes in this, my bad if so. But, afaik, that's what you want.

EDIT: I forgot to add:

Код:
if(!IRC_IsVoice(botid, channel, user)) return 0; // This can be used to check if the user has voice in the server, if the user does not have voice then they can not use the command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)