SA-MP Forums Archive
IRC, joining a passworded channel with bots. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IRC, joining a passworded channel with bots. (/showthread.php?tid=68012)



IRC, joining a passworded channel with bots. - Marcel - 06.03.2009

Hello all,

I'm having some trouble when my bots want to join a passworded channel. I have this code:
pawn Код:
for( new i = 0; i < sizeof( EchoConnection ); i++ )
    {

        EchoConnection[ i ] = ircConnect( IRC_SERVER , IRC_PORT , Bot[ i ] );
        ircSendRawData( EchoConnection[ i ] , "PRIVMSG NickServ :IDENTIFY "IRC_PASSWORD" " );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel :pass" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel :pass" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel :pass" )
    }
In the above example all #channel things are different from each other.
This doesn't work, the bots join the channel, but quit it straight after. The same goes for this code:
pawn Код:
for( new i = 0; i < sizeof( EchoConnection ); i++ )
    {

        EchoConnection[ i ] = ircConnect( IRC_SERVER , IRC_PORT , Bot[ i ] );
        ircSendRawData( EchoConnection[ i ] , "PRIVMSG NickServ :IDENTIFY "IRC_PASSWORD" " );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel pass" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel pass" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel pass" );  
    }
They also join the channel, but again, quit it straight after. When I remove the password from the channels and use this code:
pawn Код:
for( new i = 0; i < sizeof( EchoConnection ); i++ )
    {

        EchoConnection[ i ] = ircConnect( IRC_SERVER , IRC_PORT , Bot[ i ] );
        ircSendRawData( EchoConnection[ i ] , "PRIVMSG NickServ :IDENTIFY "IRC_PASSWORD" " );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );
        ircSendRawData( EchoConnection[ i ] , "JOIN #channel" );   
    }
Everything is fine. I bet it's a problem with ircSendRawData. If anyone is able to help me with this I'd really appreciate it.

Thankyou,
Marcel.


Re: IRC, joining a passworded channel with bots. - NigNog1 - 06.03.2009

use ircJoinChan!

ircJoinChan( EchoConnection [ i ], "#sa-mp cake" );

cake being the password.


Re: IRC, joining a passworded channel with bots. - Marcel - 06.03.2009

Not working.
This:
pawn Код:
for( new i = 0; i < sizeof( EchoConnection ); i++ )
    {

        EchoConnection[ i ] = ircConnect( IRC_SERVER , IRC_PORT , Bot[ i ] );
        ircSendRawData( EchoConnection[ i ] , "PRIVMSG NickServ :IDENTIFY "IRC_PASSWORD" " );
        ircJoinChan( EchoConnection [ i ], "#channel" );
        ircJoinChan( EchoConnection [ i ], "#channel" );
        ircJoinChan( EchoConnection [ i ], "#channel :pass" );
        ircJoinChan( EchoConnection [ i ], "#channel :pass" );
        ircJoinChan( EchoConnection [ i ], "#channel :pass" );     
    }
And
pawn Код:
for( new i = 0; i < sizeof( EchoConnection ); i++ )
    {

        EchoConnection[ i ] = ircConnect( IRC_SERVER , IRC_PORT , Bot[ i ] );
        ircSendRawData( EchoConnection[ i ] , "PRIVMSG NickServ :IDENTIFY "IRC_PASSWORD" " );
        ircJoinChan( EchoConnection [ i ], "#channel" );
        ircJoinChan( EchoConnection [ i ], "#channel" );
        ircJoinChan( EchoConnection [ i ], "#channel pass" );
        ircJoinChan( EchoConnection [ i ], "#channel pass" );
        ircJoinChan( EchoConnection [ i ], "#channel pass" );      
    }
Are both not working.


Re: IRC, joining a passworded channel with bots. - Marcel - 07.03.2009

Anyone?


Re: IRC, joining a passworded channel with bots. - Marcel - 07.03.2009

The problem is that topic got deleted, as the author asked the forum mods to do so.


Re: IRC, joining a passworded channel with bots. - [DRD]Rodney - 17.06.2010

I can't find this DLL file (i used to have but i overcopied it)