Niko_boy

Bug :O_O:

Dec 21st, 2011
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1.  
  2. public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
  3. {
  4. printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
  5. // Someone sent the first bot a private message
  6. //----------------------------------------------
  7.  
  8. new
  9. cmd[36],
  10. param[64]
  11. ;
  12. unformat( message , "S()[36]S()[64]" , cmd , param );
  13. if( strlen(cmd) )
  14. {
  15. if( !strcmp( cmd , "register" , true ) )
  16. {
  17. if( strlen( param ) )
  18. {
  19. new File:file;
  20. if (!fexist("irc_pass.txt"))
  21. {
  22. file = fopen("irc_pass.txt", io_write);
  23. }
  24. else
  25. {
  26. file = fopen("irc_pass.txt", io_append);
  27. }
  28. if (file)
  29. {
  30. fwrite(file, param);
  31. fwrite(file, "\r\n");
  32. fclose(file);
  33. }
  34. return 1;
  35. }
  36. }
  37. }
  38. IRC_Say( botid , user , "USAGE: register <password>" );
  39.  
  40.  
  41.  
  42. return 1;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment