commit 0bb530e8ee32a9a8b72f1a801f82b6321474d3d8
parent 08069e7cced0e7563101a1a7c4adb867caa51613
Author: Ellenor Malik <ellenor@umbrellix.net>
Date: Mon, 7 Oct 2019 22:58:25 -0700
some interesting tweaks
Diffstat:
7 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
@@ -1,3 +1,4 @@
-read the code, i'm too lazy to document this shite.
+TclServ
+====
-you need php. no questions. you need php. you also need tcl, obviously. but you need php.
+yes, we're working on it
diff --git a/boilerplate.tcl b/boilerplate.tcl
@@ -1,10 +1,16 @@
+
+
proc confighandler {servicename defdbname headline block} {
set net [lindex $headline 0]
set nsock $::sock($net)
dictassign $block nick nick ident ident host host realname realname
- if {[llength [tnda get "service/$net/$servicename/config"]] != 0} {return -code error "<$servicename> O damn, I'm already loaded for $net!"
+ if {[llength [tnda get "service/$net/$servicename/config"]] != 0} {
+ return -code error "<$servicename> O damn, I'm already loaded for $net!
+ }
tnda set "service/$net/$servicename/config" $block
- if {[tnda get "service/$net/$servicename/config/dbname"] == ""} {tnda set "service/$net/$servicename/dbname" $defdbname}
+ if {[tnda get "service/$net/$servicename/config/dbname"] == ""} {
+ tnda set "service/$net/$servicename/dbname" $defdbname
+ }
setctx $net
if {[% intclient2uid [tnda get "service/$net/$servicename/ourid"]] == ""} {% sendUid $nick $ident $host $host [set ourid [% getfreeuid]] [expr {($realname == "") ? "* $servicename *" : $realname}] $modes; set connected "Connected"} {set connected "Already connected"}
set ouroid [tnda get "service/$net/$servicename/ourid"]
diff --git a/core/0000-callbacks.tcl b/core/0000-callbacks.tcl
@@ -1,3 +1,5 @@
+# This portion, of course, is available under the MIT license if not bundled with the rest of TclServ.
+
proc llbind {sock type client comd script} {
set moretodo 1
while {0!=$moretodo} {
@@ -25,7 +27,7 @@ proc firellbind {sock type client comd args} {
if {""!=[tnda get "llbinds/$::netname($sock)/$type/$client/[ndcenc $comd]"]} {
foreach {id script} [tnda get "llbinds/$::netname($sock)/$type/$client/[ndcenc $comd]"] {
if {$script != ""} {
- set scr $script
+ set scr [string range $script 0 120]
# lappend $scr $sock
foreach {a} $args {
lappend scr $a
diff --git a/core/4000-eggcom.tcl b/core/4000-eggcom.tcl
@@ -1,6 +1,7 @@
#source chanserv.conf
#more thanks to fireegl
+# XXX THIS PORTION BLOCKS NONGPL RELEASE
proc SetUdefDefaults {{name {*}}} {
global UdefDefaults
diff --git a/modules/chanserv.disabled b/modules/chanserv.disabled
@@ -234,7 +234,7 @@ proc adduserchan {from msg} {
if {![string is integer $addlevel]} {return}
if {$addlevel > [nda get "regchan/$ndacname/levels/[tnda get "login/$::netname($::sock($::cs(netname)))/$from"]"]} {$::maintype notice $::sock($::cs(netname)) 77 $from "You can't do that; you're not the channel's Dave";return}
if {[nda get "regchan/$ndacname/levels/$adduser"] > [nda get "regchan/$ndacname/levels/[tnda get "login/$::netname($::sock($::cs(netname)))/$from"]"]} {$::maintype notice $::sock($::cs(netname)) 77 $from "You can't do that; the person you're changing the level of is more like Dave than you.";return}
- if {$adduser == [tnda get "login/$::netname($::sock($::cs(netname)))/$from"]} {$::maintype notice $::sock($::cs(netname)) 77 $from "You can't change your own level, even if you're downgrading. Sorreh :/$::netname($::sock($::cs(netname)))/";return}
+ if {$adduser == [tnda get "login/$::netname($::sock($::cs(netname)))/$from"]} {$::maintype notice $::sock($::cs(netname)) 77 $from "You can't change your own level, even if you're downgrading. Sorreh :/";return}
$::maintype notice $::sock($::cs(netname)) 77 $from "Guess what? :) User added."
nda set "regchan/$ndacname/levels/[string tolower $adduser]" $addlevel
}
diff --git a/modules/chanserv.tcl b/modules/chanserv.tcl
@@ -1,7 +1,7 @@
# ChanServ for TclServ
# 2018 09 28
# Copyright ©2018CE AsterIRC
-# All rights reserved. This file is under the GNU GPL; see
+# All rights reserved. This file is *reluctantly* under the GNU GPL; see
# LICENSE in the project root for information.
# -----------------//----------------
@@ -17,7 +17,7 @@ llbind - evnt - alive chanserv.connect
set numversion 1
proc chanserv.connect {arg} {
- puts stdout [format "there are %s chanserv blocks" [set blocks [tnda get "openconf/[ndcenc chanserv]/blocks"]]]
+ putlog [format "there are %s chanserv blocks" [set blocks [tnda get "openconf/[ndcenc chanserv]/blocks"]]]
for {set i 1} {$i < ($blocks + 1)} {incr i} {
if {[string tolower [lindex [tnda get [format "openconf/%s/hdr%s" [ndcenc chanserv] $i]] 0]] != [string tolower $arg]} {continue}
after 1000 [list chanserv.oneintro [tnda get [format "openconf/%s/hdr%s" [ndcenc chanserv] $i]] [tnda get [format "openconf/%s/n%s" [ndcenc chanserv] $i]]]
diff --git a/services.conf.example b/services.conf.example
@@ -20,6 +20,7 @@ network "pand" "services.invalid" {
loadmodule debugserv
loadmodule quoteserv
+loadmodule chanserv
# module confs after here, load before here
@@ -31,18 +32,19 @@ debugserv "pand" {
modes +oiS
comment "Or +oiDS if you dont want it to hear channel convos"
comment "idcommand is obvious."
+ realname "Depanner"
nickserv "NickServ"
nsserv services.umbrellix.net
idcommand "IDENTIFY InvictusWAUS None"
}
-
-quoteserv "umb" {
+quoteserv "panda" {
logchan #services
nick QuoteServ
ident Quote
host Umbrellix/Special/TclServ/QuoteServ
modes +oiS
+ realname "Quotes Services"
comment "Or +oiDS if you dont want it to hear channel convos"
comment "NSPass can be a username space password, if your nickserv is an atheme nickserv."
nickserv "NickServ"
@@ -50,3 +52,11 @@ quoteserv "umb" {
idcommand "IDENTIFY InvictusWAUS 5467"
operflags "oper:quote,oper:admin"
}
+
+chanserv "pand" {
+ nick ChanServ
+ ident Channel
+ host Services.Umbrellix.Net
+ modes +oiS
+ realname "Channels Services"
+}