botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 09-07-2007, 21:47   #1 (permalink)
Junior Member
 
Join Date: May 2005
Age: 22
Posts: 25
Rep Power: 0
Novice is an unknown quantity at this point
Default Silence On/Off

In ultima vreme primesc foarte multe atacuri cu flood, de aceea intreb daca exista vreun script pentru silence de genul :

<nick> !silence
<bot> Silence On/Off.
<nick> !Silence On/Off.
<bot> Silence is already On/Off.
Novice is offline   Reply With Quote
Old 09-07-2007, 23:50   #2 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

scriptul a&a light deja contine asa ceva
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 11-07-2007, 00:17   #3 (permalink)
Junior Member
 
Join Date: May 2005
Age: 22
Posts: 25
Rep Power: 0
Novice is an unknown quantity at this point
Default

Cautam un tcl separat fara de pachetul complet de la a&a.
Novice is offline   Reply With Quote
Old 11-07-2007, 05:17   #4 (permalink)
Member
 
Join Date: Jun 2004
Location: Canada
Age: 18
Posts: 141
Rep Power: 0
AdrianK is on a distinguished road
Default

erm
Pot sati offer:

Code:
<nick> !silence
<bot> Silence ACTIVATED.
<nick> !silence
<bot> Silence is already ACTIVATED
<nick> !silence -off
<bot> Silence DEACTIVATED
<nick> !silence -off
<bot> Silence is already DEACTIVATED
Deci CODE:
Code:
# Silence by StarteR2
# Usage: !silence [-off | -on]
set settings(silence) 0

bind pub N|- !silence s:silence

proc s:silence {nick host hand chan args} {

set option [lindex $args 0]

switch  --  $option {

    -on {
if {![$settings(silence)]} {
putquick "SILENCE +*!@*";
putquick "PRIVMSG $chan: Silence ACTIVATED.";
} else {
putquick "PRIVMSG $chan: Silence is already ACTIVATED.";
}

}

    -off {
if {[$settings(silence)]} {
putquick "SILENCE -*!@*";
putquick "PRIVMSG $chan: Silence DEACTIVATED.";
} else {
putquick "PRIVMSG $chan: Silence is already DEACTIVATED.";
}

}

    default {
if {![$settings(silence)]} {
putquick "SILENCE +*!@*";
putquick "PRIVMSG $chan: Silence ACTIVATED.";
} else {
putquick "PRIVMSG $chan: Silence is already ACTIVATED.";
}

}

}
}
AdrianK is offline   Reply With Quote
Old 12-07-2007, 22:45   #5 (permalink)
Junior Member
 
Join Date: May 2005
Age: 22
Posts: 25
Rep Power: 0
Novice is an unknown quantity at this point
Default

multumesc mult AdrianK
comenzile nu functioneaza, cel putin "!silence" / "silence -on" / "silence on" nu fac nimic.
Novice is offline   Reply With Quote
Old 13-07-2007, 00:34   #6 (permalink)
Member
 
Join Date: Jun 2004
Location: Canada
Age: 18
Posts: 141
Rep Power: 0
AdrianK is on a distinguished road
Default

1. Tre sa ai acc de N global ca sa mearga.
2. Daca tot nu merge si nu zice nimic, fa debug ce astepti? sa ti se dea muran gura? Dute in DCC chat si da comanda vezi ce zice, apoi ori clarifici singur ori postezi aici. Poti incerca si

Code:
.tcl putlog $errorInfo
In DCC dupa ce ai dat comanda.
AdrianK is offline   Reply With Quote
Old 13-07-2007, 21:31   #7 (permalink)
Junior Member
 
Join Date: May 2005
Age: 22
Posts: 25
Rep Power: 0
Novice is an unknown quantity at this point
Default

am gasit
[14:05] Tcl error [s:silence]: can't read "settings(silence)": no such variable
Novice is offline   Reply With Quote
Old 14-07-2007, 07:22   #8 (permalink)
spy
Junior Member
 
spy's Avatar
 
Join Date: Mar 2006
Location: Somewhere
Posts: 14
Rep Power: 0
spy is an unknown quantity at this point
Unhappy nici la mine nu merge vreo solutie?

Deci mi-a dat urmatoarele erori vreo solutie ceva?
Quote:
[05:30] <useri> wrong # args: no script following "{![$settings(silence)]}"argument
[05:30] <useri> while compiling
[05:30] <useri> "if {![$settings(silence)]} "
[05:30] <useri> ("on" arm line 2)
[05:30] <useri> invoked from within
[05:30] <useri> "switch $option {
[05:30] <useri> on {
[05:30] <useri> if {![$settings(silence)]}
[05:30] <useri> putquick "SILENCE +*!@*";
[05:30] <useri> putquick "PRIVMSG $chan: Silence ACTIVAT Mai Flodati Ratatiilor..."
[05:30] <useri> (procedure "s:silence" line 5)
[05:30] <useri> "s:silence $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
spy is offline   Reply With Quote
Old 14-07-2007, 12:55   #9 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

lipseste un open bracket aici:
Code:
if {![$settings(silence)]}
inlocuiesti cu asta
Code:
 if {![$settings(silence)]}  {
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 16-07-2007, 22:33   #10 (permalink)
Junior Member
 
Join Date: May 2005
Age: 22
Posts: 25
Rep Power: 0
Novice is an unknown quantity at this point
Default

tot nu jeala
Novice is offline   Reply With Quote
Reply

Bookmarks

« Stiri | dr.tcl »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +3. The time now is 10:01.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.