summaryrefslogtreecommitdiff
path: root/src/modules/ns_noop_convert.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:57:20 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:57:20 +0000
commit6c55e0a529c7f1216ff6f63a4fc77ea06a2a3a38 (patch)
tree91b0841faf23087ebe0c74dd4269d181a383f1e7 /src/modules/ns_noop_convert.c
parent069409cd99cf78ab8bf87a1fe69a833576414fd3 (diff)
Insane commit of doom: s/ \t/g
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1681 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/ns_noop_convert.c')
-rw-r--r--src/modules/ns_noop_convert.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/src/modules/ns_noop_convert.c b/src/modules/ns_noop_convert.c
index a4ccea7d0..6a2a29b09 100644
--- a/src/modules/ns_noop_convert.c
+++ b/src/modules/ns_noop_convert.c
@@ -27,14 +27,14 @@
/* Multi-language stuff */
#define LANG_NUM_STRINGS 8
-#define AUTOOP_SYNTAX 0
+#define AUTOOP_SYNTAX 0
#define AUTOOP_STATUS_ON 1
#define AUTOOP_STATUS_OFF 2
-#define AUTOOP_NO_NICK 3
-#define AUTOOP_ON 4
-#define AUTOOP_OFF 5
-#define AUTOOP_DESC 6
-#define AUTOOP_HELP 7
+#define AUTOOP_NO_NICK 3
+#define AUTOOP_ON 4
+#define AUTOOP_OFF 5
+#define AUTOOP_DESC 6
+#define AUTOOP_HELP 7
/*************************************************************************/
@@ -94,34 +94,34 @@ class NSNOOPConvert : public Module
**/
int mLoadData(void)
{
- int ret = 0;
- int len = 0;
-
- char *name = NULL;
-
- NickAlias *na = NULL;
- FILE *in;
-
- /* will _never_ be this big thanks to the 512 limit of a message */
- char buffer[2000];
- if ((in = fopen(NSAutoOPDBName, "r")) == NULL) {
- alog("ns_noop: WARNING: Can not open database file! (it might not exist, this is not fatal)");
- ret = 1;
- } else {
- while (fgets(buffer, 1500, in)) {
- name = myStrGetToken(buffer, ' ', 0);
- if (name) {
- len = strlen(name);
- /* Take the \n from the end of the line */
- name[len - 1] = '\0';
- if ((na = findnick(name))) {
- na->nc->flags |= NI_AUTOOP;
- }
- free(name);
- }
- }
- }
- return ret;
+ int ret = 0;
+ int len = 0;
+
+ char *name = NULL;
+
+ NickAlias *na = NULL;
+ FILE *in;
+
+ /* will _never_ be this big thanks to the 512 limit of a message */
+ char buffer[2000];
+ if ((in = fopen(NSAutoOPDBName, "r")) == NULL) {
+ alog("ns_noop: WARNING: Can not open database file! (it might not exist, this is not fatal)");
+ ret = 1;
+ } else {
+ while (fgets(buffer, 1500, in)) {
+ name = myStrGetToken(buffer, ' ', 0);
+ if (name) {
+ len = strlen(name);
+ /* Take the \n from the end of the line */
+ name[len - 1] = '\0';
+ if ((na = findnick(name))) {
+ na->nc->flags |= NI_AUTOOP;
+ }
+ free(name);
+ }
+ }
+ }
+ return ret;
}
/*************************************************************************/
@@ -132,33 +132,33 @@ int mLoadData(void)
**/
int mLoadConfig(int argc, char **argv)
{
- char *tmp = NULL;
+ char *tmp = NULL;
- Directive d[] = {
- {"NSAutoOPDBName", {{PARAM_STRING, PARAM_RELOAD, &tmp}}},
- };
+ Directive d[] = {
+ {"NSAutoOPDBName", {{PARAM_STRING, PARAM_RELOAD, &tmp}}},
+ };
- moduleGetConfigDirective(d);
+ moduleGetConfigDirective(d);
- if (NSAutoOPDBName)
- free(NSAutoOPDBName);
+ if (NSAutoOPDBName)
+ free(NSAutoOPDBName);
- if (tmp) {
- NSAutoOPDBName = tmp;
- } else {
- NSAutoOPDBName = sstrdup(DEFAULT_DB_NAME);
- alog("ns_noop: NSAutoOPDBName is not defined in Services configuration file, using default %s", NSAutoOPDBName);
- }
+ if (tmp) {
+ NSAutoOPDBName = tmp;
+ } else {
+ NSAutoOPDBName = sstrdup(DEFAULT_DB_NAME);
+ alog("ns_noop: NSAutoOPDBName is not defined in Services configuration file, using default %s", NSAutoOPDBName);
+ }
- if (!NSAutoOPDBName) {
- alog("ns_noop: FATAL: Can't read required configuration directives!");
- return MOD_STOP;
- } else {
- alog("ns_noop: Directive NSAutoOPDBName loaded (%s)...",
- NSAutoOPDBName);
- }
+ if (!NSAutoOPDBName) {
+ alog("ns_noop: FATAL: Can't read required configuration directives!");
+ return MOD_STOP;
+ } else {
+ alog("ns_noop: Directive NSAutoOPDBName loaded (%s)...",
+ NSAutoOPDBName);
+ }
- return MOD_CONT;
+ return MOD_CONT;
}
/*************************************************************************/