Bladeren bron

Add files via upload

Daniel Voipan 5 jaren geleden
bovenliggende
commit
9d7b51d050
2 gewijzigde bestanden met toevoegingen van 22 en 5 verwijderingen
  1. 1 0
      BlackTools/BT.Binds.tcl
  2. 21 5
      BlackTools/BT.Core.tcl

+ 1 - 0
BlackTools/BT.Binds.tcl

@@ -29,6 +29,7 @@ bind pubm - "***" comand:chan
 
 bind msgm - * forward:redirect
 bind msgm - "*" command:pubpriv
+bind dcc - bt command:pubdcc
 bind ctcp - ACTION blacktools:protect:me
 bind ctcp - ACTION voiceonmsg:public:me
 bind ctcp - ACTION topwords:module:me

+ 21 - 5
BlackTools/BT.Core.tcl

@@ -1736,6 +1736,10 @@ foreach w [wordwrap $reply 440] {
 if {[string equal -nocase $host "prv"]} {
 	putserv "PRIVMSG $nick :$w"
 	return
+} elseif {[string equal -nocase [lindex $host 0] "dcc"]} {
+	set idx [lindex $host 1]
+	putidx $idx $w
+	return
 }
 switch $getmethod {
 	0 {
@@ -1815,8 +1819,11 @@ if {[string equal -nocase "man.showtip" $type]} {
 if {[string equal -nocase $host "prv"]} {
 	putserv "PRIVMSG $nick :$reply"
 	return
-}
-if {[string equal -nocase $host "chan"]} {
+} elseif {[string equal -nocase [lindex $host 0] "dcc"]} {
+	set idx [lindex $host 1]
+	putidx $idx $reply
+	return
+} elseif {[string equal -nocase $host "chan"]} {
 	putserv "PRIVMSG $chan1 :$reply"
 	return
 }
@@ -1923,8 +1930,11 @@ if {[string equal -nocase "man.showtip" $type]} {
 if {[string equal -nocase $host "prv"]} {
 	putserv "PRIVMSG $nick :$reply"
 	return
-}
-if {[string equal -nocase $host "chan"]} {
+} elseif {[string equal -nocase [lindex $host 0] "dcc"]} {
+	set idx [lindex $host 1]
+	putidx $idx $reply
+	return
+} elseif {[string equal -nocase $host "chan"]} {
 	putserv "PRIVMSG $chan1 :$reply"
 	return
 }
@@ -1979,6 +1989,11 @@ if {[string match "*<*" $txt] || [string match "*>*" $txt]} {
 	lappend text $txt
 	}  	
 }
+if {[lindex $host 0] == "dcc"} {
+	set idx [lindex $host 1]
+	putidx $idx [join $text]
+	return
+}
 if {$prv == "1"} {
 	putserv "PRIVMSG $nick :[join $text]"
 	return
@@ -3966,6 +3981,7 @@ if {[string equal -nocase $total "total"]} {
 proc modul:remain {nick host hand count chan chan1 type modul gl prv} {
 	global black lastbind botnick
 	set otherchan 0
+	set charbind ""
 if {$chan != $chan1} {
 	set otherchan 1
 }
@@ -4086,7 +4102,7 @@ if {$otherchan == "1" || $prv == "1"} {
 if {$msg == ""} {
 	return
 } 
-	blacktools:tell:cmd $nick "" $hand $chan $chan1 $prv $type [string map [array get replace] $msg]
+	blacktools:tell:cmd $nick $host $hand $chan $chan1 $prv $type [string map [array get replace] $msg]
 }
 
 ########################## Other Module Process ######################