|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
Hey There, Im a Nub with irc i was wondering if theres a script that you can get so possibly when some1 types !admin or !help it pm's an op and also so when the admin/ ops types !next it shows in order who needs help, if you could help me out thatd be great, cheers
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
Begin by typing /set %h_chan YOUR_CHANNEL in any window of mIRC. Then put this code in your remotes (ALT-R). Edit the SOME_OP_NICKNAME in the first 3 lines to be a bunch of ops nicknames who should be notified by the bot. it should be in the form NICK1 NICK2 NICK3 NICK4 etc..
alias -l h_opnick {
return SOME_OP_NICKNAME
}
ON $*:TEXT:/^!(?:admin|help)(?:\s|$)/:%h_chan {
var %i = 1, %reason = Reason: $iif($2-, $2-, N/A)
.write $+(-s,$nick) h_queue.txt $nick Time: $time %reason
while ($gettok($h_opnick,%i,32)) {
if ($v1 isop #) {
.msg $v1 $nick needs help. %reason
}
inc %i
}
}
ON *:TEXT:!next:?:if ($nick isop %h_chan) { .msg $nick Help Queue List: | .play -q3 $nick h_queue.txt }
ON *:TEXT:!remove *:?:if ($nick isop %h_chan) { .write $+(-ds,$2) h_queue.txt | .msg $nick Removed $2 from Help Queue List. }
Keep in mind that !next and !remove must be messaged privately to the bot, where !admin and !help are done in the channel. !remove will remove the person from the help queue, you type !remove NICKNAME to use it
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
Hi there, thanks for your help its playing back the list after i added the text file but its not pming the ops or adding the user to the que, only way is if i add it manually alias -l h_opnick {
return admin1 admin2
}
ON $*:TEXT:/^!(?:admin|help)(?:\s|$)/:%h_chan {
var %i = 1, %reason = Reason: $iif($2-, $2-, N/A)
.write $+(-s,$nick) h_queue.txt $nick Time: $time %reason
while ($gettok($h_opnick,%i,32)) {
if ($v1 isop #) {
.msg $v1 $nick needs help. %reason
}
inc %i
}
}
ON *:TEXT:!next:?:if ($nick isop %h_chan) { .msg $nick Help Queue List: | .play -q3 $nick h_queue.txt }
ON *:TEXT:!remove *:?:if ($nick isop %h_chan) { .write $+(-ds,$2) h_queue.txt | .msg $nick Removed $2 from Help Queue List. }
an yes i did activate it :P
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
He missed a ':', and the :'s in the matchtext part of the event won't work because : means something in an event, try this: ON *:TEXT:*:%h_chan[color:red]:[/color]{
[color:red]if ($regex($1-,/^!(?:admin|help)(?:\s|$)/)) {[/color]
var %i = 1, %reason = Reason: $iif($2-, $2-, N/A)
write $+(-s,$nick) h_queue.txt $nick Time: $time %reason
while ($gettok($h_opnick,%i,32)) {
if ($v1 isop #) { .msg $v1 $nick needs help. %reason }
inc %i
}
[color:red]}[/color]
}
|
|
|
|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
cheers for yourhelp would it be possible rather than msging the bot if an op says !next , and then in open channel in announces whos next for support.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
cheers for yourhelp would it be possible rather than msging the bot if an op says !next , and then in open channel in announces whos next for support. try out... ON *:TEXT:!next:%h_chan:if ($nick isop %h_chan) { .msg %h_chan Next in the Help Queue List: | .play -q3 l1 %h_chan h_queue.txt } ON *:TEXT:!remove *:%h-chan:if ($nick isop %h_chan) { .write $+(-ds,$2) h_queue.txt | .msg %h_chan Removed $2 from Help Queue List. }
|
|
|
|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
that didnt do anything when i typed !next in the channel
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
on TEXT events don't trigger on yourself, you must have someone else type !next or load up a clone and test it with that.
Gone.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
As FiberOptics said you cant trip a ON TEXT event yourself, so heres a fix for ya...
alias -l text.event.next { if ($1 isop %h_chan) { .msg %h_chan Next in the Help Queue List: | .play -q3 l1 %h_chan h_queue.txt } }
alias -l text.event.!remove { if ($1 isop %h_chan) { .write $+(-ds,$2) h_queue.txt | .msg %h_chan Removed $2 from Help Queue List. } }
;
ON *:TEXT:!next:%h_chan:{ text.event.next $nick $2- }
ON *:TEXT:!remove *:%h-chan:{ text.event.remove $nick $2- }
ON *:INPUT:%h_chan:{
if ($1 == !next) { text.event.next $me $2- }
elseif ($1 == !remove) { text.event.remove $me $2- }
}
|
|
|
|
|