|
Joined: Dec 2004
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2004
Posts: 80 |
how u make a script that leave a channel when like: example: !part #blah and then the bot quit #blah,how u do that? and same thing with the join script,how u make one of those script?...like !join #blah,the bot joins the channel,how? pelase help me
practice makes perfect...
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 423 |
here's a tip for ya CyborAccess,
try using this sites search feature... i know there is at least two threads on this subject....
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
if u look through my script that i pasted or the bot rather you should see it but the hell with it it goes without saying that you insert a user level if u want one ok on *:text:!part:#:{
part $chan
}
on *:text:!part *:*:{
part $$2-
} the first one you enter in a channel and the bot parts that channel just !part the second one you can either enter ina channel or through a msg and you specify the channel you want it to part i.e. !part #sensei i trust this will suffice
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
i almost forgot the join on *:text:!join *:*:{
join $$2-
}
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Ricky, it's a bot. I don't think the original poster would actually let that command be triggered when everyone says it. Which I really don't think would be such a grand idea, because you get some idiots who will just flood the bot off with masses of joins. Cybor: /guser owner Your_Nick 2 Ricky, one slight alteration.
On owner:Text:!join *:#: {
if ($ulist($ial($me))) {
join [color:red]#[/color]$$2-
}
}
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
you realize im just handing him the bare minimum so he can get the idea and carry it himself but oh well the # i leave out on mine beacuase i know to type it althought i would have thought u would need a $+ between # and $$2- :tongue: oh yeah why did u make it purely on chan then if his bot is say on no channels for whatever reason he cant make it join remotely thats why i use either * or ? in this case * if it will work
Last edited by ricky_knuckles; 19/01/05 08:09 PM.
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Actually his example works.
Try it out: //tokenize 32 testing | join #$1
Will join #testing. This is an exception though, and doesn't work in other cases, since normally identifiers need to be atleast preceeded by a space in order to evaluated (when not part of another identifier itself that is, or some other exceptions like in popups where you can put a . before an identifier like $iif fex)
Greets
Gone.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
This a general reply, i'm just replying to Slade because his is the post I was reading before making this reply It might be a good idea to add a check to make sure they don't try and make you join 0 (/join 0, /join 00, /join 000, etc), which is the equivalent of /partall. on *:text:!join *:#:{
var %a, %b = $regsub($$2,/(?<=^|\x2C)0+(?=\x2C|$)/g,,%a)
join %a
}
New username: hixxy
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Indeed. Good point.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Is there anything you don't moan about? You moan about everything in every little detail. oh yeah why did u make it purely on chan then if his bot is say on no channels for whatever reason he cant make it join remotely thats why i use either * or ? in this case * if it will work
Go ahead dude, add the stupid asterisk.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
That's a good idea, but it could be improved a bit, since right now it doesn't work if you use spaces like:
#one , 000 , #two
I figured, we could as well replace any occurences of a channel specified without its prefix #, since that would give an error to join. This will catch the 0's as well, all in one.
The good thing is that it does give support for channel keys:
var %a, %b = $regsub($2-,/(?<=^|\x2C)\s?[^#]+/g,,%a)
On the test string: bla #one test, #two , 00 ,test #three four it gave: #one test,#two ,#three four
I'm sure the regex can be improved, though I gotta go, going to the movies :tongue:
Greets
Gone.
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
there you go breaking the regex out
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
did you not just gripe at me about having the #$$2- yeah sit down
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
If you try and /join #one , 000 , #two all that will happen is you join #one. /join doesn't accept spaces between channel names.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Interesting.
I'm honestly surprised, because the comma's are the delimiter, it seems weird why spaces would matter, since they can't be part of a channel name.
Oh well, the regex still works, but its merit is reduced to simply removing 0's and channel names without the # prefix.
Greets
Gone.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Comma between channelnames and between keys, space between channels and keys join #channel key join #chan1,#chan2 key1,key2 Oh and don't forget $chantypes is not always only #
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
What would this join: join #chan1,#chan2 key1,key2 ? chan1 with key1 and chan2 with key2...never knew that, always thought it was: chan key, chan key, chan key Heh, you might be surprised I don't know this stuff, but I rarely chat, I use mIRC mainly to script Well then the regex I posted should be discarded, since it was created with incomplete knowledge about joining channels. Greets
Last edited by FiberOPtics; 19/01/05 11:53 PM.
Gone.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Why does this sound like Deja Vu Fiber? It sounds like this was said the exact same time yesterday. :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
I went to bed at 11 pm yesterday, that was 2 hours before now, so I don't know what and where something about joining channels was said exactly at this time.
Eh?
Gone.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Sorry, in regards with: Heh, you might be surprised I don't know this stuff, but I rarely chat, I use mIRC mainly to script
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Stop talking in riddles lol, what's the deja vu and what do I have to do with it o.O? :tongue:
Gone.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
What would this join: join #chan1,#chan2 key1,key2 ? chan1 with key1 and chan2 with key2Yes exactly join #chan1,#chan2 0,key2 to join #chan1 with 0 key (either 0 literally or no key and using the 0 as a placeholder) and #chan2 with key2 Technically this should work for the last... /join #chan1,#chan2 ,key2 ...but some ircds don't accept the empty parameter
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Hehehehe, well that is something we was talking about on MSN last night. I've just looked back, seems it was around half 9 not this time.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
LOL yea I remember now, couldn't have been 2 pm hehe. Yep deja vu indeed
Gone.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Gone.
|
|
|
|
Joined: Dec 2004
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2004
Posts: 80 |
practice makes perfect...
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
on owner:text:!join *:#:{
if ($ulist($ial($me))) {
var %a, %b = $regsub($$2,/(?<=^|\x2C)0+(?=\x2C|$)/g,,%a)
join %a
}
}
Add yourself to the user list. /guser owner <your nick> 2
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
To add support for channel keys to mine just change join %a to join %a $3-
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Heh well, like I said, I made that regsub with incomplete knowledge about how you can join channels with keys in that particular way, so every comment I've made on the matter should be discarded.
Greets
Gone.
|
|
|
|
|