Jump to content

IRC mode


Jayson
 Share

Recommended Posts

Hi, I made a little irc client and I got some proplem. I'm trying to change the mode of somone to make him operator on IRC but i'm not sure why it doesn't work at some place.

When I select the username and OP nor trying other mode on him i'm getting the same error over and over even if i'm an operator.

That's the error that i get :

:gibson.freenode.net 481 testtting :Permission Denied - You're not an IRC operator
:gibson.freenode.net 472 testtting O :is unknown mode char to me

And that's my code to op someone :

Func op() ; /mode #channel +o nickname
    $nick_select = _GUICtrlListBox_GetSelItemsText($NameList)
    If StringInStr($nick_select, "@") Or StringInStr($nick_select, "+") Then $nick_select = StringMid($nick_select, 2)
    _IRCChangeMode($sock, $channel, $channel & " MODE +o" & $nick_select)
EndFunc ;==> op
Edited by Jayson
Link to comment
Share on other sites

; change
_IRCChangeMode($sock, $channel, $channel & " MODE +o" & $nick_select)
; to
_IRCChangeMode($sock, "+o", $channel, $nick_select)

You must all parameters set in right order, like declared in Func _IRCChangeMode().

The keyword "MODE" is always inside the function.

Best Regards BugFix  

Link to comment
Share on other sites

I have already tried that but it didn't work. The command have to be used with 3 args.

C:\Users\Jason\Desktop\jIRC\jIRC.au3(104,49) : ERROR: _IRCChangeMode() called with wrong number of args.
    _IRCChangeMode($sock, "+o", $channel, $nick_select)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\IRC.au3(164,44) : REF: definition of _IRCChangeMode().
Func _IRCChangeMode ($irc, $mode, $chan="")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...