__W3_Auto_Write(w3, "NICK ", 5);
__W3_Auto_Write(w3, nickname, strlen(nickname));
__W3_Auto_Write(w3, "\r\n", 2);
+ if(__W3_Get_Prop(w3, "IRC_PASSWORD") != NULL){
+ __W3_Auto_Write(w3, "PASS :", 6);
+ __W3_Auto_Write(w3, __W3_Get_Prop(w3, "IRC_PASSWORD"), strlen(__W3_Get_Prop(w3, "IRC_PASSWORD")));
+ __W3_Auto_Write(w3, "\r\n", 2);
+ }
char* buf = malloc(w3->readsize);
int phase = 0; /* 0: before the prefix
* 1: prefix
__W3_Add_Prop(w3, "IRC_NICKNAME", nickname);
}
+void W3_IRC_Set_Password(struct W3* w3, const char* password){
+ __W3_Add_Prop(w3, "IRC_PASSWORD", password);
+}
+
void W3_IRC_Send_Request(struct W3* w3){
__W3_Auto_Write(w3, w3->method, strlen(w3->method));
__W3_Auto_Write(w3, " ", 1);
void W3_IRC_Set_Realname(struct W3* w3, const char* realname);
void W3_IRC_Set_Servername(struct W3* w3, const char* servername);
void W3_IRC_Set_Nickname(struct W3* w3, const char* nickname);
+void W3_IRC_Set_Password(struct W3* w3, const char* password);
void W3_IRC_Send_Request(struct W3* w3);
void W3_IRC_Disconnect(struct W3* w3);