Skip to content

Instantly share code, notes, and snippets.

@TrainerGuy22
Created June 23, 2014 00:11
Show Gist options
  • Select an option

  • Save TrainerGuy22/cfd6f9eefc862b58dc4c to your computer and use it in GitHub Desktop.

Select an option

Save TrainerGuy22/cfd6f9eefc862b58dc4c to your computer and use it in GitHub Desktop.
String _change_hostmask(String message) {
String hostmask = message.split(" ")[0];
if(hostmask.indexOf(":") != 0 || hostmask.contains("@"))
return message;
return ":127.0.0.1" + message.split(" ").sublist(1).join(" ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment