IRC_GetChannelUserList and some issuess -
Yaa - 03.01.2017
btw
Code:
PHP код:
CMD:ircusers(playerid, params[])
{
if(PlayerInfo[playerid][VIP] < 1) return SendClientMessage(playerid, -1, ""R"[VCL]: "GRI"Sorry, This Command can be used just by +Silver Donator's");
new str[200];
IRC_GetChannelUserList(botIDs[0], IRCChannel, str, sizeof(str));
SendClientMessage(playerid, -1, ""YE"Online IRC Users:");
SendClientMessage(playerid, -1, str);
return 1;
}
IRC Users:
17 User in channel :/
Output:
PHP код:
Online IRC Users:
None.
[0] Yassine: wat :/
any ideas ?
Re: IRC_GetChannelUserList and some issuess -
Yaa - 04.01.2017
bump
Re: IRC_GetChannelUserList and some issuess -
oMa37 - 04.01.2017
Loop through all the connected botIDs (IRC_IsUserConnected) and try it out, Never used IRC so i can't be 100% sure if it's gonna work or not, But it might work.
Re: IRC_GetChannelUserList and some issuess -
Yaa - 04.01.2017
Quote:
Originally Posted by oMa37
Loop through all the connected botIDs (IRC_IsUserConnected) and try it out, Never used IRC so i can't be 100% sure if it's gonna work or not, But it might work.
|
ty for reply
but not work :/
it's still give me None.
Re: IRC_GetChannelUserList and some issuess -
oMa37 - 04.01.2017
Can you show me the code?
Re: IRC_GetChannelUserList and some issuess -
Yaa - 04.01.2017
first post
EDIT:
PHP код:
CMD:ircusers(playerid, params[])
{
if(PlayerInfo[playerid][VIP] < 1) return SendClientMessage(playerid, -1, ""R"[VCL]: "GRI"Sorry, This Command can be used just by +Silver Donator's");
new str[200];
IRC_GetChannelUserList(botIDs[0], IRCChannel, str, sizeof(str));
SendClientMessage(playerid, -1, ""YE"Online IRC Users:");
SendClientMessage(playerid, -1, str);
return 1;
}
Re: IRC_GetChannelUserList and some issuess -
oMa37 - 04.01.2017
Did you even read my first post?
Re: IRC_GetChannelUserList and some issuess -
Konstantinos - 04.01.2017
Quote:
Originally Posted by Incognito
- IRC_GetChannelUserList(botid, const channel[], dest[], maxlength = sizeof dest);
- Obtains a space-delimited list of all users in a channel
Note: This will store every user's name separated by a single space in dest (make sure that the array size is large enough to fit all of the names).
|
You have used it correctly but until you find out why this happens, I can only suggest a workaround. Have a global variable and:
- increase when a user joins the channel (
IRC_OnUserJoinChannel).
- decrease when a user leaves the channel (
IRC_OnUserLeaveChannel).
If a player is kicked then
IRC_OnUserKickedFromChannel will be called and I'm not sure if
IRC_OnUserLeaveChannel will be called too as I haven't used the plugin. If it won't, decrease in this callback as well.
Re: IRC_GetChannelUserList and some issuess -
Yaa - 04.01.2017
Quote:
Did you even read my first post ?
|
yes i do xD
And there just one bot :/ i don't think loop will work
Quote:
Originally Posted by Konstantinos
You have used it correctly but until you find out why this happens, I can only suggest a workaround. Have a global variable and:
- increase when a user joins the channel (IRC_OnUserJoinChannel).
- decrease when a user leaves the channel (IRC_OnUserLeaveChannel).
If a player is kicked then IRC_OnUserKickedFromChannel will be called and I'm not sure if IRC_OnUserLeaveChannel will be called too as I haven't used the plugin. If it won't, decrease in this callback as well.
|
how i can use this callback and store the users joined ? :/
Re: IRC_GetChannelUserList and some issuess - iLearner - 06.01.2017
Quote:
Originally Posted by Yaa
how i can use this callback and store the users joined ? :/
|
PHP код:
// on top of your script
new IRCUsers;
//callbacks
IRC_OnUserJoinChannel(...)
IRCUsers ++;
IRC_OnUserLeaveChannel(...)
IRCUsers--;
And you gonna check if IRC_OnUserLeaveChannel is called when a user is kicked from IRC.
Though, in my opinion its not a efficient way, but i've only explained what kons said.