|
juble
|
juble
|
hi all I wonder if any friend knows how to create a funny code.I have a bot in my channel and i want 2 thinks a) to op and deop the users that i give access and they are opers in my channel with timer and enable -disable! IE every 15 minutes to deop and after 15 minutes to op again! and... b) a code who repeat the last line in main channel (like repeating everyone who say anything)  (i want 2 different codes)..i ask too mutch ha? 
Last edited by juble; 13/04/05 05:23 PM.
|
|
|
|
Joined: Feb 2005
Posts: 193
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 193 |
Hehehehe. I'll help you on the mock code, but not the op one. I have to go in about 2 seconds. Anyway, here's the mock code: on *:text:*:*:{ privmsg $chan $1- }
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
1. Change #Channel to your channel name It is untested, but if it doesn't work I'll try working on it.
menu nicklist {
Op Access
.Add: {
if (!$read(opaccess.txt,w,$address($$1,8))) {
write opaccess.txt $address($$1,8)
echo -a Added $$1 ( $+ $address($$1,8) $+ )
}
else {
echo -a $$1 ( $+ $address($$1,8) $+ ) is already in list.
}
}
.Del: {
if ($read(opaccess.txt,w,$address($$1,8))) {
write -dw $+(",$address($$1,8),") opaccess.txt
echo -a Removed $$1 ( $+ $address($$1,8)
}
else {
echo -a $$1 ( $+ $address($$1,8) $+ ) is not in list.
}
}
.-
.Status
..On: {
op.chk
}
..Off: {
.timeropaccess off
.timerdeopaccess off
}
}
alias op.chk {
.timeropaccess 0 900 opaccess
.timerdeopaccess 0 1800 deopaccess
}
alias opaccess {
if ($me isop [color:red]#Channel[/color]) {
var %x = $lines(opaccess.txt)
while (%x) {
if ($gettok($read(opaccess.txt,%x),1,33) ison [color:red]#Channel[/color]) && ($gettok($read(opaccess.txt,%x),1,33) !isop [color:red]#Channel[/color]) { mode [color:red]#Channel[/color] +o $v1 }
dec %x
}
}
}
alias deopaccess {
if ($me isop [color:red]#Channel[/color]) {
var %x = $lines(opaccess.txt)
while (%x) {
if ($gettok($read(opaccess.txt,%x),1,33) ison [color:red]#Channel[/color]) && ($gettok($read(opaccess.txt,%x),1,33) isop [color:red]#Channel[/color]) { mode [color:red]#Channel[/color] -o $v1 }
dec %x
}
}
}
2.
On *:Text:*:[color:red]#Channel[/color]: {
msg $chan $nick said $1-
}
Right click on a nickname from the nicklist to add/remove enable/disable. I hope this helps. -Andy
|
|
|
|
juble
|
juble
|
thank you my friends for your help SladeKraven ..yes its work and i want to thank you for helping me. I have one question only.The add-del session gives real acceess or is it temporary for only one time? I think the code works for the opers that already have access either i check the add either not ??
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
By clicking 'Add' your adding users in the style of.. nick!*user@*.host.
Which means it will only op them if their nick, user and host match whats in the file its reading from. To access the op access list type /run opaccess.txt. It isn't temporary, the users will always be in the text file till you remove it.
Del deletes the entry from the text file.
|
|
|
|
juble
|
juble
|
on this code slade how can i make it to replay not every last line but if they pass by three lines ..then to repeat ?? to repeat every three lines
On *:Text:*:#Channel: {
msg $chan $nick said $1-
}
Last edited by juble; 14/04/05 04:32 PM.
|
|
|
|
DaveC
|
DaveC
|
on *:JOIN:#channel:{ unset $+(%,ontext.,$network,.,$chan,.*.1) | unset $+(%,ontext.,$network,.,$chan,.*.2) }
on *:TEXT:*:#channel:{
if $len($($+(%,ontext.,$network,.,$chan,.,$nick,.2),2)) { msg $chan $nick said $($+(%,ontext.,$network,.,$chan,.,$nick,.2),2)) }
set $+(%,ontext.,$network,.,$chan,.,$nick,.2) $($+(%,ontext.,$network,.,$chan,.,$nick,.1),2))
set $+(%,ontext.,$network,.,$chan,.,$nick,.1) $1-
} ^ This waits tell someone says 3 lines then echos the 1st one, next line echos the next one etc etc. on *:JOIN:#channel:{ unset $+(%,ontext.,$network,.,$chan,.*.1) | unset $+(%,ontext.,$network,.,$chan,.*.2) }
on *:TEXT:*:#channel:{
if $len($($+(%,ontext.,$network,.,$chan,.,$nick,.2),2)) {
msg $chan $nick said $($+(%,ontext.,$network,.,$chan,.,$nick,.2),2))
msg $chan $nick said $($+(%,ontext.,$network,.,$chan,.,$nick,.1),2))
msg $chan $nick said $1-
unset $+(%,ontext.,$network,.,$chan,.,$nick,.*)
}
else {
set $+(%,ontext.,$network,.,$chan,.,$nick,.2) $($+(%,ontext.,$network,.,$chan,.,$nick,.1),2))
set $+(%,ontext.,$network,.,$chan,.,$nick,.1) $1-
}
}
^ this one waits tell someone says 3 lines then echos all 3 of them then waits for 3 lines again. I wasnt sure which way u ment
|
|
|
|
juble
|
juble
|
nope ..i mean when someone say 3 or 4 lines then echos only the last line. example: <jim> hi all how are u? <jane> nice <john> we are ok <sara> great jim how about u <BOT> great jim how about u (repeat)
|
|
|
|
DaveC
|
DaveC
|
on *:TEXT:*:#: { channel.event.alias msg $1- }
on *:ACTION:*:#:{ channel.event.alias describe $1- }
on *:NOTICE:*:#:{ channel.event.alias notice $1- }
; $1 = <msg/describe/notice>
; $2-= message
alias channel.event.alias {
inc -u86400 $+(%,onchannel.event.counter.for.,$network,.,$chan)
if ($($+(%,onchannel.event.counter.for.,$network,.,$chan),2) >= 3) {
unset $+(%,onchannel.event.counter.for.,$network,.,$chan)
$1 $chan $2-
}
} This covers TEXT, ACTION and NOTICE, and if dont want one?, simple remove the ON Event line for it.
|
|
|
|
juble
|
juble
|
thank you thank you 
Last edited by juble; 16/04/05 07:49 AM.
|
|
|
|
|