+}
+
+static void trustaccounts_rehash(int hooknum, void *arg) {
+ loadtrustaccounts();
+}
+
+void _init(void) {
+ sstring *m;
+ int trustport;
+
+ countext = registertgext("count");
+ if(countext == -1)
+ return;
+
+ m = getconfigitem("trusts_policy", "enforcepolicy_irc");
+ if(m)
+ enforcepolicy_irc = atoi(m->content);
+
+ m = getconfigitem("trusts_policy", "enforcepolicy_auth");
+ if(m)
+ enforcepolicy_auth = atoi(m->content);
+
+ m = getconfigitem("trusts_policy", "trustport");
+ if(m)
+ trustport = atoi(m->content);
+ else
+ trustport = DEFAULT_TRUSTPORT;
+
+ if(trustport)
+ listenerfd = createlistenersock(trustport);
+
+ loadtrustaccounts();
+