mIRC Home    About    Download    Register    News    Help

Print Thread
#173325 23/03/07 08:27 PM
B
BigSmoke
BigSmoke
B
Hello i am not very good with scripting so i hope you want to help me =)

Can some one give me a script like you can find most time in #help channels

if you typ !next the first who has joined wil get voice (+v) and if you typ !done he get kicked banned for like 10 sec (rejoin block)

Can some help me with this

Thx in advance =)

#173326 23/03/07 08:58 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try this Simple Helpbot snippet I made before. It just doesn't have the kick ban after !done.

#173329 23/03/07 09:18 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Here's one that will do that as well. If someone leaves the channel (part/quit), they lose their spot. Only ops can use !next/!done and the script will do what you asked for those commands.

** Replace all occurences of #chan with your channel name.

Code:
on *:join:#chan: {
  write joinlist.txt $nick
}

on *:part:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:quit: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:text:!next:#chan: {
  if ($nick isop $chan) {
    if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
    set %help.next $read(joinlist.txt,1)
    while (%help.next !ison $chan) {
      write -dl1 joinlist.txt
      if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
      set %help.next $read(joinlist.txt,1)
    }
    mode $chan +v %help.next
    msg $chan %help.next $+ , how may we help you?
  }
}

on *:text:!done:#chan: {
  if ($nick isop $chan) {
    if (%help.next ison $chan) { ban -ku10 $chan %help.next }
  }
}

Riamus2 #173364 24/03/07 03:58 PM
B
BigSmoke
BigSmoke
B
Originally Posted By: Riamus2
Here's one that will do that as well. If someone leaves the channel (part/quit), they lose their spot. Only ops can use !next/!done and the script will do what you asked for those commands.

** Replace all occurences of #chan with your channel name.

Code:
on *:join:#chan: {
  write joinlist.txt $nick
}

on *:part:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:quit: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:text:!next:#chan: {
  if ($nick isop $chan) {
    if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
    set %help.next $read(joinlist.txt,1)
    while (%help.next !ison $chan) {
      write -dl1 joinlist.txt
      if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
      set %help.next $read(joinlist.txt,1)
    }
    mode $chan +v %help.next
    msg $chan %help.next $+ , how may we help you?
  }
}

on *:text:!done:#chan: {
  if ($nick isop $chan) {
    if (%help.next ison $chan) { ban -ku10 $chan %help.next }
  }
}


It works but if someone already have op


[16:30:58] [Join-#help] Tombraider
[16:30:58] [Mode-#help] ChanServ +o Tombraider
[16:44:13] [Join-#help] gast
[16:46:03] @BigSmoke : !next
[16:46:03] <@VoiceBot> Tombraider, how may we help you?
[16:46:03] [Mode-#help] VoiceBot +v Tombraider
[16:46:08] @BigSmoke : !next
[16:46:08] <@VoiceBot> Tombraider, how may we help you?
[16:46:09] @BigSmoke : !next
[16:46:09] <@VoiceBot> Tombraider, how may we help you?

but he leaves gast (and Tombraider is op) zo why he give him voice

#173382 24/03/07 08:04 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Sorry, didn't think about if a person gets opped. Here you are:

Code:
on *:join:#chan: {
  write joinlist.txt $nick
}

on *:op:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:part:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:quit: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:text:!next:#chan: {
  if ($nick isop $chan) {
    if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
    set %help.next $read(joinlist.txt,1)
    while (%help.next !ison $chan) {
      write -dl1 joinlist.txt
      if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
      set %help.next $read(joinlist.txt,1)
    }
    mode $chan +v %help.next
    msg $chan %help.next $+ , how may we help you?
  }
}

on *:text:!done:#chan: {
  if ($nick isop $chan) {
    if (%help.next ison $chan) { ban -ku10 $chan %help.next }
  }
}


That will fix the problem if someone's opped after joining the channel.

Riamus2 #173405 25/03/07 02:00 AM
B
BigSmoke
BigSmoke
B
Thanks for your help man i really am greatfull but he still doesnt work =(

#173408 25/03/07 02:48 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Are you getting any error messages? If so, what are they?
If not, then what are you basing your statement of it not working on?
I tested Riamus' code, after you posted that it's not working, and it worked for me exactly as it should.

Riamus2 #173423 25/03/07 09:42 AM
H
HuMoR
HuMoR
H
Riamus2 good work, i take the code to improve it...
On green my modifications...


on *:join:#replaceforyourchannel: {
if ($nick !isop #) { write joinlist.txt $nick }
}

on *:op:#replaceforyourchannel: {
if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:part:#replaceforyourchannel: {
if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:quit: {
if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:text:!next:#replaceforyourchannel: {
if ($nick isop $chan) {
if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
set %help.next $read(joinlist.txt,1)
while (%help.next !ison $chan) {
write -dl1 joinlist.txt
if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
set %help.next $read(joinlist.txt,1)
}
mode $chan +v %help.next
msg $chan %help.next $+ , how may we help you?
write -dl1 joinlist.txt
}
}

on *:text:!done:#replaceforyourchannel: {
if ($nick isop $chan) {
if (%help.next ison $chan) { ban -ku10 $chan %help.next | kick $chan %help.next If you dont need more, please, out from #replaceforyourchannel }
}
}


Sorry, I don't speak english wink

Cya.-

#173476 25/03/07 05:38 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Well, most of that isn't necessary.
Quote:

on *:join:#replaceforyourchannel: {
if ($nick !isop #) { write joinlist.txt $nick }
}


That's not necessary as no one is op when they join. This is why you need the on OP event.

As far as all of your #chan replacements... I already mentioned that they needed changed.

Quote:
write -dl1 joinlist.txt


That part is good to have. It shouldn't make a difference, but it's a valid change to the script, though it would be better in the kick part.

Quote:

if (%help.next ison $chan) { ban -ku10 $chan %help.next | kick $chan %help.next If you dont need more, please, out from #replaceforyourchannel }


That's unnecessary. The /ban command already is kicking the person. If a message is needed, then it can be added to the end of the ban command in my script.

Below, is the updated version that has the line deletion added.

Code:
on *:join:#chan: {
  write joinlist.txt $nick
}

on *:op:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:part:#chan: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:quit: {
  if ($read(joinlist.txt,w,$nick)) { write -dl $readn joinlist.txt }
}

on *:text:!next:#chan: {
  if ($nick isop $chan) {
    if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
    set %help.next $read(joinlist.txt,1)
    while (%help.next !ison $chan) {
      write -dl1 joinlist.txt
      if ($lines(joinlist.txt) == 0) { msg $chan No users waiting for help. | return }
      set %help.next $read(joinlist.txt,1)
    }
    mode $chan +v %help.next
    msg $chan %help.next $+ , how may we help you?
  }
}

on *:text:!done:#chan: {
  if ($nick isop $chan) {
    if (%help.next ison $chan) {
      ban -ku10 $chan %help.next If you need more help, you may return.
      if ($read(joinlist.txt,w,%help.next)) { write -dl $readn joinlist.txt }
    }
  }
}

Riamus2 #173488 25/03/07 06:09 PM
H
HuMoR
HuMoR
H
Originally Posted By: Riamus2
Well, most of that isn't necessary.
Quote:

on *:join:#replaceforyourchannel: {
if ($nick !isop #) { write joinlist.txt $nick }
}


That's not necessary as no one is op when they join. This is why you need the on OP event.


If you join a channel with your @, you are a helper, so, why put this nick on list? You are writing 2 times when you can no write...
And the OP event its neccesary if you join and get the op later...

Originally Posted By: Riamus2

As far as all of your #chan replacements... I already mentioned that they needed changed.


Only for prevent 'coz i dont quote all your post...

Originally Posted By: Riamus2

Quote:
write -dl1 joinlist.txt


That part is good to have. It shouldn't make a difference, but it's a valid change to the script, though it would be better in the kick part.


No, if you have 2 helpers working when the first helper take the first nick on joinlist, the 2 helper must be ready to take the new first nick on joinlist, so, when you give the voice, delete the nick...

Originally Posted By: Riamus2

Quote:

if (%help.next ison $chan) { ban -ku10 $chan %help.next | kick $chan %help.next If you dont need more, please, out from #replaceforyourchannel }


That's unnecessary. The /ban command already is kicking the person. If a message is needed, then it can be added to the end of the ban command in my script.


/ban command, kick too? I have an older mirc and /ban only make the ban...

Cya!.-


#173490 25/03/07 06:15 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Originally Posted By: HuMoR
If you join a channel with your @, you are a helper, so, why put this nick on list? You are writing 2 times when you can no write...
And the OP event its neccesary if you join and get the op later...


When you join, you do not have @ or + or any other channel mode. You get these *after* you join, so you cannot check for it the way that you did.

Quote:
No, if you have 2 helpers working when the first helper take the first nick on joinlist, the 2 helper must be ready to take the new first nick on joinlist, so, when you give the voice, delete the nick...


The script is made for helping one nick at a time. It would need various other changes to work with multiple nicks. Unless that is necessary, then the -dl line should be in the kick part.

Quote:
/ban command, kick too? I have an older mirc and /ban only make the ban...


/help /ban

You'll find that the -k switch has been around for a long time.

#173497 25/03/07 06:25 PM
H
HuMoR
HuMoR
H
You said that you havent @ when join a channel? I have this:

Code:
on *:JOIN:#ayuda:{
if ($nick isop #) { echo -ste $nick joined #ayuda }
}
}


And works.

/ban -ku10 ... I don't see the -k in your script, my mistake wink

Originally Posted By: BigSmoke

[16:30:58] [Join-#help] Tombraider
[16:30:58] [Mode-#help] ChanServ +o Tombraider
[16:44:13] [Join-#help] gast
[16:46:03] @BigSmoke : !next
[16:46:03] <@VoiceBot> Tombraider, how may we help you?
[16:46:03] [Mode-#help] VoiceBot +v Tombraider
[16:46:08] @BigSmoke : !next
[16:46:08] <@VoiceBot> Tombraider, how may we help you?
[16:46:09] @BigSmoke : !next
[16:46:09] <@VoiceBot> Tombraider, how may we help you?


In this example, he try more of 1 nick, so... I think that he want more of one...

Cya!.-

#173499 25/03/07 06:33 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Originally Posted By: HuMoR
You said that you havent @ when join a channel? I have this:

Code:
on *:JOIN:#ayuda:{
if ($nick isop #) { echo -ste $nick joined #ayuda }
}
}


And works.


It shouldn't. And I tested it and it doesn't. If you have it "working," then there is probably another script that is doing the same echo "on OP" instead.

Quote:
In this example, he try more of 1 nick, so... I think that he want more of one...


If you look closely, only 1 person is helping in that example.

Riamus2 #173503 25/03/07 06:46 PM
H
HuMoR
HuMoR
H
Originally Posted By: Riamus2

If you look closely, only 1 person is helping in that example.


But 2 nicks of the JoinList... If you delete the first nick of the joinlist when you have the voice, then you can take the new first nick on joinlist and help both...
I see that on the log...
1 nick helping 2 nicks of the JoinList...
If you know about OGamenet servers, had this bots, and 1 helper can take 1 or more "tickets" to help...

Cya!.-

#173514 25/03/07 07:24 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
He's only helping one at a time. The other was an op. This script works for 1 nick being helped at a time. It will not work for helping more than 1 nick at a time because it uses a variable to track the nick being helped. Trust me. I wrote the script, so I know what it's capable of.

#173521 25/03/07 07:35 PM
H
HuMoR
HuMoR
H
Originally Posted By: Riamus2
He's only helping one at a time. The other was an op. This script works for 1 nick being helped at a time. It will not work for helping more than 1 nick at a time because it uses a variable to track the nick being helped. Trust me. I wrote the script, so I know what it's capable of.


You don't understand me...

Originally Posted By: BigSmoke

[16:30:58] [Join-#help] Tombraider
[16:30:58] [Mode-#help] ChanServ +o Tombraider
[16:44:13] [Join-#help] gast
[16:46:03] @BigSmoke : !next
[16:46:03] <@VoiceBot> Tombraider, how may we help you?
[16:46:03] [Mode-#help] VoiceBot +v Tombraider
[16:46:08] @BigSmoke : !next
[16:46:08] <@VoiceBot> Tombraider, how may we help you?
[16:46:09] @BigSmoke : !next
[16:46:09] <@VoiceBot> Tombraider, how may we help you?


Join Tombraider, later gast...
If you put !next, the script take gast for the list, then +v gast. If you delete this nick when you gives the voice, if you write !next, the bot take the next on list... If no nicks, return "No nicks waiting for help" else gives voice to the other nick (If exists)
1 nick (Tombraider) help 1 nick (gast) or 2 nick (if exists) or more...
I copy paste the code on my irc-bot, believe me, works fine with 1 helper -> 1 or more nicks
2 helper -> 2 or more nicks.
If you want to see... /server irc.ogamenet.net -j #bar

Cya!.-

EDIT: I dont use your script, 'coz have a modification. I think its the script that BigSmoke wants to do...

Last edited by HuMoR; 25/03/07 07:38 PM.
#173526 25/03/07 07:57 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
It will not kick/ban anyone when doing multiple nicks without requiring that either the nick be supplied with !done, or a change to how the nick is tracked.


Link Copied to Clipboard