Guest User

Untitled

a guest
Nov 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. //<?php
  2.  
  3. require("settings.php");
  4. $time = strftime("%H:%M:%S");
  5. $arguments = $args;
  6. unset($args[0]);
  7. print_r("[$time] $chan : defname command used by $who[0] with arguments: " . implode(", ", $args) . "\n");
  8.  
  9. $a = count($arguments);
  10.  
  11. if (count($args) < 1) {
  12. $bot->notice($who[0], "Correct syntax is: !defname NAME where name is the runescape name you'd like registered. If the name has spaces, please use underscores to fill in the spaces. ");
  13. }
  14. else {
  15. if (!file_exists("/cyrus/token/defnames/$who[2]") {
  16. $fh = fopen("/cyrus/token/defnames/$who[2]", "x+");
  17. fclose($fh);
  18. }
  19. //I know file_put_contents would make the file if it's not there, smd
  20. file_put_contents("/cyrus/token/defnames/$who[2]", $args[0]);
  21. }
Add Comment
Please, Sign In to add comment