|
Jamezzz
|
Jamezzz
|
on *:TEXT:!tb *:#: { if ($2 !ison $chan) && ($nick isop $chan) && ($3 isnum) && ($2 != $me) {
}
elseif ($nick isop $chan) && ($3 isnum || $2 != $me) {
timer 1 0 ban -ku $+ $calc($3 * 1) $chan $2 $4-
timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily banned from07 $chan 05for07 $3 05seconds (Reason:07 $4- $+ 5).
timer 1 1 notice $2 You've been temporarily banned from7 $chan 5for7 $3 5seconds (7Reason5:7 $4- $+ 5) 7(>_<)5.
timer 1 $3 notice $2 You've been unbanned from7 $chan 5(^_^)7.
}
} Hey i got this script from a friend, how would i edit this script so that only i can use it, at the moment it only works for other ops in the same channel as me, which is more like a bot, but i'd like the script to work only for me. I'm not good at scipting at all but i know it's meant to be an input script? But not sure how to go about it :$. Thanks in advance.
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
on *:TEXT:!tb*:#: { if ($2 !ison $chan) && ($nick isop $chan) && ($3 isnum) && ($2 != $me) || ($nick == Jamezzz) {
}
elseif ($nick isop $chan) && ($3 isnum || $2 != $me) {
.timer 1 0 ban -ku $+ $calc($3 * 1) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily banned from07 $chan 05for07 $3 05seconds (Reason:07 $4- $+ 5).
.timer 1 1 notice $2 You've been temporarily banned from7 $chan 5for7 $3 5seconds (7Reason5:7 $4- $+ 5) 7(>_<)5.
.timer 1 $3 notice $2 You've been unbanned from7 $chan 5(^_^)7.
}
}
Change to the nickname of your own used in chat.
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
Don't quote me but I believed the OP asked how he can use this on his own, being an INPUT script. edited code.
on *:INPUT:!tb*:#: { if ($2 !ison $chan) && ($me isop #) && ($3 isnum) && ($2 != $me) {
}
elseif ($me isop $chan) && ($3 isnum || $2 != $me) {
.timer 1 0 ban -ku $+ $calc($3 * 1) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily banned from07 $chan 05for07 $3 05seconds (Reason:07 $4- $+ 5).
.timer 1 1 notice $2 You've been temporarily banned from7 $chan 5for7 $3 5seconds (7Reason5:7 $4- $+ 5) 7(>_<)5.
.timer 1 $3 notice $2 You've been unbanned from7 $chan 5(^_^)7.
}
halt
}
either way if the OP was just asking for it to be a bot script so that he can only access it rather then him having it as is own script he should of been told to use ($nick == $me) while that if the OP changed nicks from example Jamezzz to JamesApple then his script would work.
|
|
|
|
Jamezzz
|
Jamezzz
|
Don't quote me but I believed the OP asked how he can use this on his own, being an INPUT script. edited code.
on *:INPUT:!tb*:#: { if ($2 !ison $chan) && ($me isop #) && ($3 isnum) && ($2 != $me) {
}
elseif ($me isop $chan) && ($3 isnum || $2 != $me) {
.timer 1 0 ban -ku $+ $calc($3 * 1) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily banned from07 $chan 05for07 $3 05seconds (Reason:07 $4- $+ 5).
.timer 1 1 notice $2 You've been temporarily banned from7 $chan 5for7 $3 5seconds (7Reason5:7 $4- $+ 5) 7(>_<)5.
.timer 1 $3 notice $2 You've been unbanned from7 $chan 5(^_^)7.
}
halt
}
either way if the OP was just asking for it to be a bot script so that he can only access it rather then him having it as is own script he should of been told to use ($nick == $me) while that if the OP changed nicks from example Jamezzz to JamesApple then his script would work. hmm i tried your edited version and it still doesn't work. Basically, i want to load the script, and be able to use the !tb command, just me and not other OPS/HOPS in the channel. Is it possible :$? Thanks in advance
|
|
|
|
Joined: Aug 2003
Posts: 143
Vogon poet
|
Vogon poet
Joined: Aug 2003
Posts: 143 |
Hi The on input even´t it´s rong. /help on input Format: on <level>:INPUT:<*#?=!@>:<commands> example:. on *:input:#: {
on *:input:#: {
if ( $1 == !tb ) {
echo -s correct
}
}
good luck
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
Based on Miguel's say, your code should work this way: on *:INPUT:#: {
if (!tb == $1) && ($2 !ison $chan) && ($3 isnum) && ($2 != $me) {
}
elseif ($me isop $chan) && ($3 isnum || $2 != $me) {
.timer 1 0 ban -ku $+ $calc($3 * 1) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily banned from07 $chan 05for07 $3 05seconds (Reason:07 $4- $+ 5).
.timer 1 1 notice $2 You've been temporarily banned from7 $chan 5for7 $3 5seconds (7Reason5:7 $4- $+ 5) 7(>_<)5.
.timer 1 1 $3 notice $2 You've been unbanned from7 $chan 5(^_^)7.
}
halt
}
Last edited by Tomao; 30/06/08 06:18 PM.
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
LoL my bad, i wasnt thinking of edited the code in after the : honest mistake.
|
|
|
|
Joined: Nov 2006
Posts: 1,552
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,552 |
...but you corrected neither the weird if-elseif, nor the third timer... This should do it, I also added some quick echo feedback. on &*:INPUT:#: {
if ($1 == !tb) {
if ($me isop $chan) {
if ($2) {
if (($v1 ison $chan) && ($v1 != $me)) {
if ($3 isnum 1-) {
ban -ku $+ $int($3) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily 7banned 5from07 $chan 05for07 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) $+ 5.
.timer 1 2 notice $2 5You've been temporarily 7banned 5from7 $chan 5for7 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) 7(>_<)5.
.timer 1 $3 notice $2 5You've been 7unbanned 5from7 $chan (^_^)5.
}
else { echo -ac info TempBan: No/Invalid duration given. Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info TempBan: No such user $qt($2) on chan $chan $+ . Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info TempBan: No parameters given. Syntax: !tb <nick> <duration ins s> [reason] }
}
else { echo -ac info TempBan: You're not opped in $chan $+ . }
halt
}
}
|
|
|
|
Jamezzz
|
Jamezzz
|
...but you corrected neither the weird if-elseif, nor the third timer... This should do it, I also added some quick echo feedback. on &*:INPUT:#: {
if ($1 == !tb) {
if ($me isop $chan) {
if ($2) {
if (($v1 ison $chan) && ($v1 != $me)) {
if ($3 isnum 1-) {
ban -ku $+ $int($3) $chan $2 $4-
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily 7banned 5from07 $chan 05for07 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) $+ 5.
.timer 1 2 notice $2 5You've been temporarily 7banned 5from7 $chan 5for7 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) 7(>_<)5.
.timer 1 $3 notice $2 5You've been 7unbanned 5from7 $chan (^_^)5.
}
else { echo -ac info TempBan: No/Invalid duration given. Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info TempBan: No such user $qt($2) on chan $chan $+ . Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info TempBan: No parameters given. Syntax: !tb <nick> <duration ins s> [reason] }
}
else { echo -ac info TempBan: You're not opped in $chan $+ . }
halt
}
} yeeh, this works great but is there a way to edit the script so that people in the channel would see me type "!tb <nick> <duration in s> [reason]", instead of temp banning them as soon as i enter the command. would this be on text, rather than on input script? sorry for all the hassle lol
|
|
|
|
Joined: Jul 2007
Posts: 1,124
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,124 |
I don't think you can use an on text event to trigger your own command. As to your inquiry about showing people whom you ban, it is easy, just add /msg command behind the ban as such: ban -ku $+ $int($3) $chan $2 $4- | msg $chan $me adds !tb $2 $3 $4 to the ban list. on &*:INPUT:#: {
if ($1 == !tb) {
if ($me isop $chan) {
if ($2) {
if (($v1 ison $chan) && ($v1 != $me)) {
if ($3 isnum 1-) {
ban -ku $+ $int($3) $chan $2 $4- | msg $chan $me adds !tb $2 $3 $4 to the ban list.
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily 7banned 5from07 $chan 05for07 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) $+ 5.
.timer 1 2 notice $2 5You've been temporarily 7banned 5from7 $chan 5for7 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) 7(>_<)5.
.timer 1 $3 notice $2 5You've been 7unbanned 5from7 $chan (^_^)5.
}
else { echo -ac info * TempBan: No/Invalid duration given. Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info * TempBan: No such user $qt($2) on chan $chan $+ . Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info * TempBan: No parameters given. Syntax: !tb <nick> <duration ins s> [reason] }
}
else { echo -ac info * TempBan: You're not opped in $chan $+ . }
halt
}
}
Last edited by Tomao; 01/07/08 08:52 PM.
|
|
|
|
Jamezzz
|
Jamezzz
|
I don't think you can use an on text event to trigger your own command. As to your inquiry about showing people whom you ban, it is easy, just add /msg command behind the ban as such: ban -ku $+ $int($3) $chan $2 $4- | msg $chan $me adds !tb $2 $3 $4 to the ban list. on &*:INPUT:#: {
if ($1 == !tb) {
if ($me isop $chan) {
if ($2) {
if (($v1 ison $chan) && ($v1 != $me)) {
if ($3 isnum 1-) {
ban -ku $+ $int($3) $chan $2 $4- | msg $chan $me adds !tb $2 $3 $4 to the ban list.
.timer 1 1 msg $chan 5(o_O)7 $2 05has been temporarily 7banned 5from07 $chan 05for07 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) $+ 5.
.timer 1 2 notice $2 5You've been temporarily 7banned 5from7 $chan 5for7 $duration($3) $iif(($4),05(Reason:07 $4- $+ 5)) 7(>_<)5.
.timer 1 $3 notice $2 5You've been 7unbanned 5from7 $chan (^_^)5.
}
else { echo -ac info * TempBan: No/Invalid duration given. Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info * TempBan: No such user $qt($2) on chan $chan $+ . Syntax: !tb <nick> <duration in s> [reason] }
}
else { echo -ac info * TempBan: No parameters given. Syntax: !tb <nick> <duration ins s> [reason] }
}
else { echo -ac info * TempBan: You're not opped in $chan $+ . }
halt
}
}
Thanks to all that helped, all working now  .
|
|
|
|
Joined: Nov 2006
Posts: 1,552
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,552 |
yeeh, this works great but is there a way to edit the script so that people in the channel would see me type "!tb <nick> <duration in s> [reason]", instead of temp banning them as soon as i enter the command. ...or you simply remove the line that runs: "halt" in my original post. This /halt command well.. halts processing of the input text (that is, in this case: halt sending the "message" to the server). 
|
|
|
|
|