-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfreenode.eh
34 lines (29 loc) · 1.04 KB
/
freenode.eh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, June 1991.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/gpl-2.0.html>,
# or in pdf format at <http://www.dhampir.no/stuff/private/gpl-2.0.pdf>
# Copyright 2016 - Øyvind 'bolt' Hvidsten <[email protected]>
case "${cmd^^}" in
$ERR_NICKNAMEINUSE)
sf_stderr "Freenode: Nickname is already in use."
say "NickServ" "GHOST $NICK $PASS"
return 0
;;
$ERR_UNAVAILRESOURCE)
sf_stderr "Freenode: Nickname is temporarily unavailable."
say "NickServ" "RELEASE $NICK $PASS"
return 0
;;
*)
sf_stderr "Freenode: Unknown error: ${cmd^^} ${data}"
;;
esac
return 1