This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhook.php
61 lines (51 loc) · 1.63 KB
/
hook.php
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
-------------------------------------------------------------------------
irc plugin for GLPI
Copyright (C) 2017 by the irc Development Team.
https://github.com/pluginsGLPI/irc
-------------------------------------------------------------------------
LICENSE
This file is part of irc.
irc is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
irc 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 irc. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/**
* Plugin install process
*
* @return boolean
*/
function plugin_irc_install() {
Config::setConfigurationValues('core', ['notifications_irc' => 0]);
Config::setConfigurationValues(
'plugin:irc', [
'server' => '',
'port' => '',
'nick' => '',
'password' => '',
'channels' => '',
'nicksto' => ''
]
);
return true;
}
/**
* Plugin uninstall process
*
* @return boolean
*/
function plugin_irc_uninstall() {
$config = new Config();
$config->deleteByCriteria(['context' => 'plugin:irc']);
$config->deleteConfigurationValues('core', ['notifications_irc']);
return true;
}