sscanf(2.0) and IRC command
#1

More sscanf 2.0 dilemmas!

I'm rewriting my IRC script, I'm trying to add this command but I got to a certain point and got stuck... how would I do it so you can enter a password parameter and it'll use it but if you don't enter a password parameter it'll just join the channel without. I'm tired right now I can't think properly .. any help is appreciated, etc.

Also, note that the parameters will be strings, right? The usage format'd be like:
pawn Код:
!join #channel passwordhere
- with password

or it can also be used without

pawn Код:
!join #channel
pawn Код:
IRCCMD:join(botid, channel[], user[], host[], params[])
{
    if(IRC_IsOp(botid, channel, user))
    {
      if(!isnull(params))
      {
            new channel, msg[128], pass;
            if(sscanf(params, "s[100]z[100]", channel, pass))
            {
                IRC_JoinChannel(gBotID[0], channel
Reply


Messages In This Thread
sscanf(2.0) and IRC command - by dcmd_crash - 29.04.2010, 01:03
Re: sscanf(2.0) and IRC command - by Miguel - 29.04.2010, 02:08
Re: sscanf(2.0) and IRC command - by dcmd_crash - 29.04.2010, 02:15

Forum Jump:


Users browsing this thread: 1 Guest(s)